|
template<class T , typename std::enable_if<(!detail::is_bit_cast_valid< detail::byte_array_wrapper< T >, T >() &&!traits::enable_reinterpret_detach_cast< typename std::decay< T >::type >::value), bool >::type = true> |
QUICKCPPLIB_NODISCARD constexpr byte_array_reference< T > | detach_cast (const T &,...) noexcept |
| Detaches a live object into its detached byte representation, ending the lifetime of the input object, and beginning the lifetime of an array of byte sized exactly the size of the input object at the same memory location, which is returned. All references to the input object become INVALID. Any use of the input object after detachment has occurred is illegal!
|
|
template<class T , typename std::enable_if<(!detail::is_bit_cast_valid< T, detail::byte_array_wrapper< T > >() &&!traits::enable_reinterpret_attach_cast< typename std::decay< T >::type >::value), bool >::type = true> |
QUICKCPPLIB_NODISCARD constexpr T & | attach_cast (const_byte_array_reference< T > &,...) noexcept |
| Reattaches a previously detached object, beginning the lifetime of the output object, and ending the lifetime of the input array of byte. All references to the input byte array become INVALID. Any use of the input array after attachment has occurred is illegal!
|
|
template<class T , typename std::enable_if<(detail::is_bit_cast_valid< detail::byte_array_wrapper< T >, T >() &&!traits::enable_reinterpret_detach_cast< typename std::decay< T >::type >::value), bool >::type = true> |
QUICKCPPLIB_NODISCARD constexpr byte_array_reference< T > | detach_cast (T &v, detail::bit_castable_overload={}) noexcept |
| Detaches a non-const bit-castable object into its detached non-const byte representation, ending the lifetime of the input object. Defined behaviour in C++ 20 (though only the clang compiler currently reliably does not copy the byte array twice. GCC avoids the memory copy for small objects, MSVC always copies the byte array twice).
|
|
template<class T , typename std::enable_if<(detail::is_bit_cast_valid< const detail::byte_array_wrapper< T >, const T >() &&!traits::enable_reinterpret_detach_cast< typename std::decay< T >::type >::value), bool >::type = true> |
QUICKCPPLIB_NODISCARD constexpr const_byte_array_reference< T > | detach_cast (const T &v, detail::bit_castable_overload={}) noexcept |
| Detaches a const bit-castable object into its detached const byte representation, ending the lifetime of the input object. Defined behaviour in C++ 20 (though only the clang compiler currently reliably does not copy the byte array twice. GCC avoids the memory copy for small objects, MSVC always copies the byte array twice).
|
|
template<class T , typename std::enable_if<(detail::is_bit_cast_valid< T, detail::byte_array_wrapper< T > >() &&!traits::enable_reinterpret_attach_cast< typename std::decay< T >::type >::value &&!std::is_const< T >::value), bool >::type = true> |
QUICKCPPLIB_NODISCARD constexpr T & | attach_cast (byte_array_reference< T > v, detail::bit_castable_overload={}) noexcept |
| Attaches a non-const bit-castable object from its detached non-const byte representation, ending the lifetime of the input array. Defined behaviour in C++ 20 (though only the clang compiler currently reliably does not copy the byte array twice. GCC avoids the memory copy for small objects, MSVC always copies the byte array twice).
|
|
template<class T , typename std::enable_if<(detail::is_bit_cast_valid< T, const detail::byte_array_wrapper< T > >() &&!traits::enable_reinterpret_attach_cast< typename std::decay< T >::type >::value &&std::is_const< T >::value), bool >::type = true> |
QUICKCPPLIB_NODISCARD constexpr const T & | attach_cast (const_byte_array_reference< T > v, detail::bit_castable_overload={}) noexcept |
| Attaches a const bit-castable object from its detached const byte representation, ending the lifetime of the input array. Defined behaviour in C++ 20 (though only the clang compiler currently reliably does not copy the byte array twice. GCC avoids the memory copy for small objects, MSVC always copies the byte array twice).
|
|
template<class T , typename std::enable_if<(!detail::is_bit_cast_valid< detail::byte_array_wrapper< T >, T >() &&traits::enable_reinterpret_detach_cast< typename std::decay< T >::type >::value), bool >::type = true> |
QUICKCPPLIB_NODISCARD constexpr byte_array_reference< T > | detach_cast (T &v, detail::reinterpret_cast_overload={}) noexcept |
| Reinterpret casts a non-const object reference into a non-const byte representation. Pure undefined behaviour. Available only if traits::enable_reinterpret_detach_cast<T> is true for the type.
|
|
template<class T , typename std::enable_if<(!detail::is_bit_cast_valid< const detail::byte_array_wrapper< T >, const T >() &&traits::enable_reinterpret_detach_cast< typename std::decay< T >::type >::value), bool >::type = true> |
QUICKCPPLIB_NODISCARD constexpr const_byte_array_reference< T > | detach_cast (const T &v, detail::reinterpret_cast_overload={}) noexcept |
| Reinterpret casts a const object reference into a const byte representation. Pure undefined behaviour. Available only if traits::enable_reinterpret_detach_cast<T> is true for the type.
|
|
template<class T , typename std::enable_if<(!detail::is_bit_cast_valid< T, detail::byte_array_wrapper< T > >() &&traits::enable_reinterpret_attach_cast< typename std::decay< T >::type >::value &&!std::is_const< T >::value), bool >::type = true> |
QUICKCPPLIB_NODISCARD constexpr T & | attach_cast (byte_array_reference< T > v, detail::reinterpret_cast_overload={}) noexcept |
| Reinterpret casts a const byte representation into a const object. Pure undefined behaviour. Available only if traits::enable_reinterpret_attach_cast<T> is true for the type.
|
|
template<class T , typename std::enable_if<(!detail::is_bit_cast_valid< const T, const detail::byte_array_wrapper< T > >() &&traits::enable_reinterpret_attach_cast< typename std::decay< T >::type >::value &&std::is_const< T >::value), bool >::type = true> |
QUICKCPPLIB_NODISCARD constexpr T & | attach_cast (const_byte_array_reference< T > v, detail::reinterpret_cast_overload={}) noexcept |
| Reinterpret casts a non-const byte representation into a non-const object. Pure undefined behaviour. Available only if traits::enable_reinterpret_attach_cast<T> is true for the type.
|
|