diff --git a/Redcraft.Utility/Source/Private/Testing/TemplatesTesting.cpp b/Redcraft.Utility/Source/Private/Testing/TemplatesTesting.cpp index 1d222d8..37f9fd8 100644 --- a/Redcraft.Utility/Source/Private/Testing/TemplatesTesting.cpp +++ b/Redcraft.Utility/Source/Private/Testing/TemplatesTesting.cpp @@ -270,7 +270,7 @@ void TestVariant() { using T = decltype(Arg); always_check(Arg == 10); - always_check(TIsConst::Type>::Value == bIsConst); + always_check(CConst::Type> == bIsConst); always_check(CLValueReference == bIsLValue); always_check(CRValueReference == bIsRValue); return 0; diff --git a/Redcraft.Utility/Source/Private/Testing/TypeTraitsTesting.cpp b/Redcraft.Utility/Source/Private/Testing/TypeTraitsTesting.cpp index 5e0a0a1..f0a4a60 100644 --- a/Redcraft.Utility/Source/Private/Testing/TypeTraitsTesting.cpp +++ b/Redcraft.Utility/Source/Private/Testing/TypeTraitsTesting.cpp @@ -166,67 +166,67 @@ void TestTypeTraits() // TypeProperties.h - always_check(!TIsConst::Value); - always_check(TIsConst::Value); - always_check(!TIsConst::Value); - always_check(TIsConst::Value); + always_check(!CConst); + always_check(CConst); + always_check(!CConst); + always_check(CConst); - always_check(!TIsVolatile::Value); - always_check(!TIsVolatile::Value); - always_check(TIsVolatile::Value); - always_check(TIsVolatile::Value); + always_check(!CVolatile); + always_check(!CVolatile); + always_check(CVolatile); + always_check(CVolatile); - always_check(TIsTrivial::Value); - always_check(!TIsTrivial::Value); + always_check(CTrivial); + always_check(!CTrivial); - always_check(TIsTriviallyCopyable::Value); - always_check(!TIsTriviallyCopyable::Value); - always_check(!TIsTriviallyCopyable::Value); + always_check(CTriviallyCopyable); + always_check(!CTriviallyCopyable); + always_check(!CTriviallyCopyable); - always_check(TIsStandardLayout::Value); - always_check(!TIsStandardLayout::Value); - always_check(!TIsStandardLayout::Value); + always_check(CStandardLayout); + always_check(!CStandardLayout); + always_check(!CStandardLayout); - always_check(THasUniqueObjectRepresentations::Value); - always_check(!THasUniqueObjectRepresentations::Value); + always_check(CUniqueObjectRepresentible); + always_check(!CUniqueObjectRepresentible); - always_check(TIsEmpty::Value); - always_check(!TIsEmpty::Value); - always_check(TIsEmpty::Value); - always_check(TIsEmpty::Value); - always_check(!TIsEmpty::Value); - always_check(!TIsEmpty::Value); + always_check(CEmpty); + always_check(!CEmpty); + always_check(CEmpty); + always_check(CEmpty); + always_check(!CEmpty); + always_check(!CEmpty); - always_check(TIsPolymorphic::Value); - always_check(!TIsPolymorphic::Value); + always_check(CPolymorphic); + always_check(!CPolymorphic); - always_check(TIsAbstract::Value); - always_check(!TIsAbstract::Value); + always_check(CAbstract); + always_check(!CAbstract); - always_check(!TIsFinal::Value); - always_check(TIsFinal::Value); + always_check(!CFinal); + always_check(CFinal); - always_check(!TIsAggregate::Value); - always_check(TIsAggregate::Value); - always_check(TIsAggregate::Value); - always_check(!TIsAggregate::Value); + always_check(!CAggregate); + always_check(CAggregate); + always_check(CAggregate); + always_check(!CAggregate); - always_check(TIsSigned::Value); - always_check(!TIsSigned::Value); + always_check(CSigned); + always_check(!CSigned); - always_check(!TIsUnsigned::Value); - always_check(TIsUnsigned::Value); + always_check(!CUnsigned); + always_check(CUnsigned); - always_check(!TIsBoundedArray::Value); - always_check(!TIsBoundedArray::Value); - always_check(TIsBoundedArray::Value); + always_check(!CBoundedArray); + always_check(!CBoundedArray); + always_check(CBoundedArray); - always_check(!TIsUnboundedArray::Value); - always_check(TIsUnboundedArray::Value); - always_check(!TIsUnboundedArray::Value); + always_check(!CUnboundedArray); + always_check(CUnboundedArray); + always_check(!CUnboundedArray); - always_check(!TIsScopedEnum::Value); - always_check(TIsScopedEnum::Value); + always_check(!CScopedEnum); + always_check(CScopedEnum); // SupportedOperations.h diff --git a/Redcraft.Utility/Source/Public/Templates/Any.h b/Redcraft.Utility/Source/Public/Templates/Any.h index b93f3d4..4595b6e 100644 --- a/Redcraft.Utility/Source/Public/Templates/Any.h +++ b/Redcraft.Utility/Source/Public/Templates/Any.h @@ -364,7 +364,7 @@ private: TypeInfo = reinterpret_cast(&SelectedTypeInfo); constexpr bool bIsInlineStorable = sizeof(SelectedType) <= InlineSize && alignof(SelectedType) <= InlineAlignment; - constexpr bool bIsTriviallyStorable = bIsInlineStorable && TIsTrivial::Value && TIsTriviallyCopyable::Value; + constexpr bool bIsTriviallyStorable = bIsInlineStorable && CTrivial && CTriviallyCopyable; if constexpr (bIsTriviallyStorable) { diff --git a/Redcraft.Utility/Source/Public/Templates/Atomic.h b/Redcraft.Utility/Source/Public/Templates/Atomic.h index 78b6b80..01b5cc8 100644 --- a/Redcraft.Utility/Source/Public/Templates/Atomic.h +++ b/Redcraft.Utility/Source/Public/Templates/Atomic.h @@ -51,7 +51,7 @@ NAMESPACE_PRIVATE_END #endif -template requires TIsTriviallyCopyable::Value +template requires CTriviallyCopyable && TIsCopyConstructible::Value && TIsMoveConstructible::Value && TIsCopyAssignable::Value && TIsMoveAssignable::Value struct TAtomic : public FSingleton diff --git a/Redcraft.Utility/Source/Public/TypeTraits/CompositeType.h b/Redcraft.Utility/Source/Public/TypeTraits/CompositeType.h index 7b4751e..6142e18 100644 --- a/Redcraft.Utility/Source/Public/TypeTraits/CompositeType.h +++ b/Redcraft.Utility/Source/Public/TypeTraits/CompositeType.h @@ -18,8 +18,8 @@ template concept CScalar = NAMESPACE_STD::is_scalar_v; template concept CCompound = NAMESPACE_STD::is_compound_v; template concept CMemberPointer = NAMESPACE_STD::is_member_pointer_v; -template concept CSignedIntegral = CIntegral && TIsSigned::Value; -template concept CUnsignedIntegral = CIntegral && TIsUnsigned::Value; +template concept CSignedIntegral = CIntegral && CSigned; +template concept CUnsignedIntegral = CIntegral && CUnsigned; NAMESPACE_MODULE_END(Utility) NAMESPACE_MODULE_END(Redcraft) diff --git a/Redcraft.Utility/Source/Public/TypeTraits/TypeProperties.h b/Redcraft.Utility/Source/Public/TypeTraits/TypeProperties.h index bf274cd..baa71b9 100644 --- a/Redcraft.Utility/Source/Public/TypeTraits/TypeProperties.h +++ b/Redcraft.Utility/Source/Public/TypeTraits/TypeProperties.h @@ -10,24 +10,22 @@ NAMESPACE_REDCRAFT_BEGIN NAMESPACE_MODULE_BEGIN(Redcraft) NAMESPACE_MODULE_BEGIN(Utility) -template struct TIsConst : TBoolConstant> { }; -template struct TIsVolatile : TBoolConstant> { }; -template struct TIsTrivial : TBoolConstant> { }; -template struct TIsTriviallyCopyable : TBoolConstant> { }; -template struct TIsStandardLayout : TBoolConstant> { }; -template struct THasUniqueObjectRepresentations : TBoolConstant> { }; -template struct TIsEmpty : TBoolConstant> { }; -template struct TIsPolymorphic : TBoolConstant> { }; -template struct TIsAbstract : TBoolConstant> { }; -template struct TIsFinal : TBoolConstant> { }; -template struct TIsAggregate : TBoolConstant> { }; -template struct TIsSigned : TBoolConstant> { }; -template struct TIsUnsigned : TBoolConstant> { }; -template struct TIsBoundedArray : TBoolConstant> { }; -template struct TIsUnboundedArray : TBoolConstant> { }; - -template -struct TIsScopedEnum : TBoolConstant && !TIsConvertible::Value> { }; +template concept CConst = NAMESPACE_STD::is_const_v; +template concept CVolatile = NAMESPACE_STD::is_volatile_v; +template concept CTrivial = NAMESPACE_STD::is_trivial_v; +template concept CTriviallyCopyable = NAMESPACE_STD::is_trivially_copyable_v; +template concept CStandardLayout = NAMESPACE_STD::is_standard_layout_v; +template concept CUniqueObjectRepresentible = NAMESPACE_STD::has_unique_object_representations_v; +template concept CEmpty = NAMESPACE_STD::is_empty_v; +template concept CPolymorphic = NAMESPACE_STD::is_polymorphic_v; +template concept CAbstract = NAMESPACE_STD::is_abstract_v; +template concept CFinal = NAMESPACE_STD::is_final_v; +template concept CAggregate = NAMESPACE_STD::is_aggregate_v; +template concept CSigned = NAMESPACE_STD::is_signed_v; +template concept CUnsigned = NAMESPACE_STD::is_unsigned_v; +template concept CBoundedArray = NAMESPACE_STD::is_bounded_array_v; +template concept CUnboundedArray = NAMESPACE_STD::is_unbounded_array_v; +template concept CScopedEnum = CEnum && !TIsConvertible::Value; NAMESPACE_MODULE_END(Utility) NAMESPACE_MODULE_END(Redcraft)