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

This commit is contained in:
2022-05-15 23:22:49 +08:00
parent 22fe906eda
commit c316b8f190
6 changed files with 67 additions and 69 deletions

View File

@ -364,7 +364,7 @@ private:
TypeInfo = reinterpret_cast<uintptr>(&SelectedTypeInfo);
constexpr bool bIsInlineStorable = sizeof(SelectedType) <= InlineSize && alignof(SelectedType) <= InlineAlignment;
constexpr bool bIsTriviallyStorable = bIsInlineStorable && TIsTrivial<SelectedType>::Value && TIsTriviallyCopyable<SelectedType>::Value;
constexpr bool bIsTriviallyStorable = bIsInlineStorable && CTrivial<SelectedType> && CTriviallyCopyable<SelectedType>;
if constexpr (bIsTriviallyStorable)
{

View File

@ -51,7 +51,7 @@ NAMESPACE_PRIVATE_END
#endif
template <typename T, bool bIsRef = false> requires TIsTriviallyCopyable<T>::Value
template <typename T, bool bIsRef = false> requires CTriviallyCopyable<T>
&& TIsCopyConstructible<T>::Value && TIsMoveConstructible<T>::Value
&& TIsCopyAssignable<T>::Value && TIsMoveAssignable<T>::Value
struct TAtomic : public FSingleton