refactor(typetraits): replaces template class type traits with concepts for TypeTraits/CompositeType.h

This commit is contained in:
2022-05-15 23:10:02 +08:00
parent 1dcd3dc3b3
commit 22fe906eda
10 changed files with 59 additions and 73 deletions

View File

@ -7,10 +7,6 @@ NAMESPACE_REDCRAFT_BEGIN
NAMESPACE_MODULE_BEGIN(Redcraft)
NAMESPACE_MODULE_BEGIN(Utility)
template <typename T> concept CSignedIntegral = CIntegral<T> && TIsSigned<T>::Value;
template <typename T> concept CUnsignedIntegral = CIntegral<T> && TIsUnsigned<T>::Value;
template <typename T> concept CNonBooleanIntegral = CIntegral<T> && !TIsSame<typename TRemoveCVRef<T>::Type, bool>::Value;
NAMESPACE_MODULE_END(Utility)
NAMESPACE_MODULE_END(Redcraft)
NAMESPACE_REDCRAFT_END

View File

@ -13,7 +13,7 @@ NAMESPACE_MODULE_BEGIN(Utility)
template <typename T>
concept CMovable =
TIsObject<T>::Value &&
CObject<T> &&
CMoveConstructible<T> &&
CAssignableFrom<T&, T> &&
CSwappable<T>;