8 #include <EASTL/internal/config.h>
10 #if defined(EA_PRAGMA_ONCE_SUPPORTED)
14 #include <EASTL/internal/memory_base.h>
15 #include <EASTL/type_traits.h>
31 #if defined(EASTL_CONSTEXPR_BIT_CAST_SUPPORTED) && EASTL_CONSTEXPR_BIT_CAST_SUPPORTED
33 template<
typename To,
typename From,
34 typename = eastl::enable_if_t<
35 sizeof(To) ==
sizeof(From)
40 EA_CONSTEXPR To bit_cast(
const From& from) EA_NOEXCEPT
42 return __builtin_bit_cast(To, from);
47 template<
typename To,
typename From,
48 typename = eastl::enable_if_t<
49 sizeof(To) ==
sizeof(From)
54 inline To bit_cast(
const From& from) EA_NOEXCEPT
58 return reinterpret_cast<To&
>(to);
EA Standard Template Library.
Definition: algorithm.h:288
T * addressof(T &value) EA_NOEXCEPT
Definition: memory_base.h:29
Definition: type_transformations.h:615
Definition: type_pod.h:708