feat(concept): add concepts that depend on templates such as Forward and add corresponding tests
This commit is contained in:
18
Redcraft.Utility/Source/Public/Concepts/BooleanTestable.h
Normal file
18
Redcraft.Utility/Source/Public/Concepts/BooleanTestable.h
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreTypes.h"
|
||||
#include "Templates/Utility.h"
|
||||
#include "Concepts/Convertible.h"
|
||||
#include "TypeTraits/TypeTraits.h"
|
||||
|
||||
NAMESPACE_REDCRAFT_BEGIN
|
||||
NAMESPACE_MODULE_BEGIN(Redcraft)
|
||||
NAMESPACE_MODULE_BEGIN(Utility)
|
||||
|
||||
template <typename T>
|
||||
concept CBooleanTestable = CConvertibleTo<T, bool> &&
|
||||
requires(T && B) { { !Forward<T>(B) } -> CConvertibleTo<bool>; };
|
||||
|
||||
NAMESPACE_MODULE_END(Utility)
|
||||
NAMESPACE_MODULE_END(Redcraft)
|
||||
NAMESPACE_REDCRAFT_END
|
Reference in New Issue
Block a user