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

This commit is contained in:
2022-05-15 22:56:53 +08:00
parent 5d1f622af8
commit 1dcd3dc3b3
18 changed files with 152 additions and 156 deletions

View File

@ -68,8 +68,7 @@ struct alignas(InlineAlignment) TAny
}
}
template <typename T, typename... Types> requires TIsObject<typename TDecay<T>::Type>::Value
&& (!TIsArray<typename TDecay<T>::Type>::Value) && TIsDestructible<typename TDecay<T>::Type>::Value
template <typename T, typename... Types> requires TIsDestructible<typename TDecay<T>::Type>::Value
&& TIsConstructible<typename TDecay<T>::Type, Types...>::Value
FORCEINLINE explicit TAny(TInPlaceType<T>, Types&&... Args)
{
@ -204,8 +203,7 @@ struct alignas(InlineAlignment) TAny
return *this;
}
template <typename T, typename... Types> requires TIsObject<typename TDecay<T>::Type>::Value
&& (!TIsArray<typename TDecay<T>::Type>::Value) && TIsDestructible<typename TDecay<T>::Type>::Value
template <typename T, typename... Types> requires TIsDestructible<typename TDecay<T>::Type>::Value
&& TIsConstructible<typename TDecay<T>::Type, T&&>::Value
FORCEINLINE typename TDecay<T>::Type& Emplace(Types&&... Args)
{