feat(concept): add basic concepts and the corresponding testing
This commit is contained in:
16
Redcraft.Utility/Source/Public/Concepts/Derived.h
Normal file
16
Redcraft.Utility/Source/Public/Concepts/Derived.h
Normal file
@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreTypes.h"
|
||||
#include "TypeTraits/TypeTraits.h"
|
||||
#include "Concepts/Convertible.h"
|
||||
|
||||
NAMESPACE_REDCRAFT_BEGIN
|
||||
NAMESPACE_MODULE_BEGIN(Redcraft)
|
||||
NAMESPACE_MODULE_BEGIN(Utility)
|
||||
|
||||
template <typename T, typename U>
|
||||
concept CDerivedFrom = TIsBaseOf<U, T>::Value && CConvertibleTo<const volatile T*, const volatile U*>;
|
||||
|
||||
NAMESPACE_MODULE_END(Utility)
|
||||
NAMESPACE_MODULE_END(Redcraft)
|
||||
NAMESPACE_REDCRAFT_END
|
Reference in New Issue
Block a user