| TIsBitwiseConstructible
|
Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Templates/UnrealTypeTraits.h |
Include |
#include "Templates/UnrealTypeTraits.h" |
template<typename T, typename Arg>
struct TIsBitwiseConstructible
Tests if a type T is bitwise-constructible from a given argument type U. That is, whether or not the U can be memcpy'd in order to produce an instance of T, rather than having to go via a constructor.
Examples: TIsBitwiseConstructible<PODType, PODType >::Value == true // PODs can be trivially copied TIsBitwiseConstructible<const int, int >::Value == true // a non-const Derived pointer is trivially copyable as a const Base pointer TIsBitwiseConstructible<int, const int>::Value == false // not legal the other way because it would be a const-correctness violation TIsBitwiseConstructible<int32, uint32 >::Value == true // signed integers can be memcpy'd as unsigned integers TIsBitwiseConstructible<uint32, int32 >::Value == true // and vice versa
TIsBitwiseConstructible< const T , T >
TIsBitwiseConstructible< const T, U >
TIsBitwiseConstructible< int16, uint16 >
TIsBitwiseConstructible< int32, uint32 >
TIsBitwiseConstructible< int64, uint64 >
TIsBitwiseConstructible< int8, uint8 >
TIsBitwiseConstructible< T, T >
TIsBitwiseConstructible< uint16, int16 >
TIsBitwiseConstructible< uint32, int32 >
TIsBitwiseConstructible< uint64, int64 >
TIsBitwiseConstructible< uint8, int8 >
Name |
Description |
---|---|
Value |
Assume no bitwise construction in general. |