From 465ce882b97aa4a62f498d318a814687d8de0e13 Mon Sep 17 00:00:00 2001 From: _Redstone_c_ Date: Sat, 19 Mar 2022 14:46:11 +0800 Subject: [PATCH] fix(typetraits): fix that TIsBitwiseConstructible and TIsBitwiseRelocatable cannot completely remove cv-qualifier --- .../Source/Public/TypeTraits/BitwiseOperations.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Redcraft.Utility/Source/Public/TypeTraits/BitwiseOperations.h b/Redcraft.Utility/Source/Public/TypeTraits/BitwiseOperations.h index ddaa090..02286ae 100644 --- a/Redcraft.Utility/Source/Public/TypeTraits/BitwiseOperations.h +++ b/Redcraft.Utility/Source/Public/TypeTraits/BitwiseOperations.h @@ -19,12 +19,18 @@ template struct TIsZeroConstructible : TBoolConstant::Va // This type traits is allowed to be specialised. template struct TIsBitwiseConstructible; +template struct TIsBitwiseConstructible< T, const U> : TIsBitwiseConstructible { }; +template struct TIsBitwiseConstructible< T, volatile U> : TIsBitwiseConstructible { }; +template struct TIsBitwiseConstructible< T, const volatile U> : TIsBitwiseConstructible { }; +template struct TIsBitwiseConstructible : TIsBitwiseConstructible { }; template struct TIsBitwiseConstructible : TIsBitwiseConstructible { }; template struct TIsBitwiseConstructible : TIsBitwiseConstructible { }; template struct TIsBitwiseConstructible : TIsBitwiseConstructible { }; +template struct TIsBitwiseConstructible< volatile T, U> : TIsBitwiseConstructible { }; template struct TIsBitwiseConstructible< volatile T, const U> : TIsBitwiseConstructible { }; template struct TIsBitwiseConstructible< volatile T, volatile U> : TIsBitwiseConstructible { }; template struct TIsBitwiseConstructible< volatile T, const volatile U> : TIsBitwiseConstructible { }; +template struct TIsBitwiseConstructible : TIsBitwiseConstructible { }; template struct TIsBitwiseConstructible : TIsBitwiseConstructible { }; template struct TIsBitwiseConstructible : TIsBitwiseConstructible { }; template struct TIsBitwiseConstructible : TIsBitwiseConstructible { }; @@ -47,12 +53,18 @@ template <> struct TIsBitwiseConstructible< int64, uint64> : FTrue { }; // It is usually only necessary to specialize TIsBitwiseConstructible and not recommended to specialize TIsBitwiseRelocatable. template struct TIsBitwiseRelocatable; +template struct TIsBitwiseRelocatable< T, const U> : TIsBitwiseRelocatable { }; +template struct TIsBitwiseRelocatable< T, volatile U> : TIsBitwiseRelocatable { }; +template struct TIsBitwiseRelocatable< T, const volatile U> : TIsBitwiseRelocatable { }; +template struct TIsBitwiseRelocatable : TIsBitwiseRelocatable { }; template struct TIsBitwiseRelocatable : TIsBitwiseRelocatable { }; template struct TIsBitwiseRelocatable : TIsBitwiseRelocatable { }; template struct TIsBitwiseRelocatable : TIsBitwiseRelocatable { }; +template struct TIsBitwiseRelocatable< volatile T, U> : TIsBitwiseRelocatable { }; template struct TIsBitwiseRelocatable< volatile T, const U> : TIsBitwiseRelocatable { }; template struct TIsBitwiseRelocatable< volatile T, volatile U> : TIsBitwiseRelocatable { }; template struct TIsBitwiseRelocatable< volatile T, const volatile U> : TIsBitwiseRelocatable { }; +template struct TIsBitwiseRelocatable : TIsBitwiseRelocatable { }; template struct TIsBitwiseRelocatable : TIsBitwiseRelocatable { }; template struct TIsBitwiseRelocatable : TIsBitwiseRelocatable { }; template struct TIsBitwiseRelocatable : TIsBitwiseRelocatable { };