QuickCppLib 0.10
Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!
Loading...
Searching...
No Matches
bit_cast.hpp File Reference
#include "config.hpp"
#include <type_traits>

Classes

struct  quickcpplib::_xxx::bit_cast::traits::is_move_relocating< T >

Namespaces

namespace  quickcpplib
 The QuickCppLib namespace.
namespace  quickcpplib::_xxx
 Per commit unique namespace to prevent different git submodule versions clashing.
namespace  quickcpplib::_xxx::bit_cast
namespace  quickcpplib::_xxx::bit_cast::traits
 Namespace for user specialised traits.
namespace  quickcpplib::_xxx::bit_cast::detail

Macros

#define QUICKCPPLIB_USE_STD_BIT_CAST   0

Typedefs

template<class T>
using quickcpplib::_xxx::bit_cast::detail::is_integral_or_enum = std::integral_constant<bool, std::is_integral<T>::value || std::is_enum<T>::value>
template<class To, class From>
using quickcpplib::_xxx::bit_cast::detail::is_static_castable
template<class To, class From>
using quickcpplib::_xxx::bit_cast::detail::is_union_castable
template<class To, class From>
using quickcpplib::_xxx::bit_cast::detail::is_bit_castable

Functions

template<class To, class From, typename std::enable_if<(detail::is_bit_castable< To, From >::value &&detail::is_static_castable< To, From >::value &&!detail::is_union_castable< To, From >::value), bool >::type = true>
constexpr To quickcpplib::_xxx::bit_cast::bit_cast (const From &from, detail::static_cast_overload={}) noexcept
 Bit cast emulation chosen if types are move relocating or trivally copyable, have identical size, and are statically castable. Constexpr.
template<class To, class From, typename std::enable_if<(detail::is_bit_castable< To, From >::value &&!detail::is_static_castable< To, From >::value &&detail::is_union_castable< To, From >::value), bool >::type = true>
constexpr To quickcpplib::_xxx::bit_cast::bit_cast (const From &from, detail::union_cast_overload={}) noexcept
 Bit cast emulation chosen if types are move relocating or trivally copyable, have identical size, and are union castable. Constexpr.
template<class To, class From, typename std::enable_if<(detail::is_bit_castable< To, From >::value &&!detail::is_static_castable< To, From >::value &&!detail::is_union_castable< To, From >::value), bool >::type = true>
To quickcpplib::_xxx::bit_cast::bit_cast (const From &from, detail::memmove_overload={}) noexcept
 Bit cast emulation chosen if an array of types which are move relocating or trivally copyable, and have identical size. NOT constexpr.

Macro Definition Documentation

◆ QUICKCPPLIB_USE_STD_BIT_CAST

#define QUICKCPPLIB_USE_STD_BIT_CAST   0