diff --git a/Redcraft.Utility/Source/Private/Testing/TypeTraitsTesting.cpp b/Redcraft.Utility/Source/Private/Testing/TypeTraitsTesting.cpp index eb464c2..4eb5ef6 100644 --- a/Redcraft.Utility/Source/Private/Testing/TypeTraitsTesting.cpp +++ b/Redcraft.Utility/Source/Private/Testing/TypeTraitsTesting.cpp @@ -47,9 +47,9 @@ void TestTypeTraits() { // HelperClasses.h - always_check(TypeTraits::TIntegralConstant<1>::Value == 1); - always_check(static_cast(TypeTraits::TIntegralConstant<2>::Value) == 2); - always_check(TypeTraits::TIntegralConstant<3>() == 3); + always_check((TypeTraits::TConstant::Value == 1)); + always_check(static_cast(TypeTraits::TConstant::Value) == 2); + always_check((TypeTraits::TConstant() == 3)); always_check(!TypeTraits::FFalse::Value); always_check(TypeTraits::FTrue::Value); diff --git a/Redcraft.Utility/Source/Public/TypeTraits/HelperClasses.h b/Redcraft.Utility/Source/Public/TypeTraits/HelperClasses.h index e2bc9f4..5fc760b 100644 --- a/Redcraft.Utility/Source/Public/TypeTraits/HelperClasses.h +++ b/Redcraft.Utility/Source/Public/TypeTraits/HelperClasses.h @@ -10,18 +10,16 @@ NAMESPACE_BEGIN(TypeTraits) template struct TConstant { - using Type = InType; - static constexpr Type Value = InValue; - constexpr operator Type() const { return Value; } - constexpr Type operator()() const { return Value; } + using ValueType = InType; + using Type = TConstant; + static constexpr ValueType Value = InValue; + constexpr operator ValueType() const { return Value; } + constexpr ValueType operator()() const { return Value; } }; template using TBoolConstant = TConstant; -template -using TIntegralConstant = TConstant; - using FTrue = TBoolConstant; using FFalse = TBoolConstant;