|
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 | 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. More...
|
|
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 | 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. More...
|
|
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 | 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. More...
|
|
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 |
= {} |
|
) |
| |
|
inlineconstexprnoexcept |
Bit cast emulation chosen if types are move relocating or trivally copyable, have identical size, and are statically castable. Constexpr.
123 return static_cast<To
>(from);
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 |
= {} |
|
) |
| |
|
inlineconstexprnoexcept |
Bit cast emulation chosen if types are move relocating or trivally copyable, have identical size, and are union castable. Constexpr.
135 return detail::bit_cast_union<To, From>{from}.target;
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 |
= {} |
|
) |
| |
|
inlinenoexcept |
Bit cast emulation chosen if an array of types which are move relocating or trivally copyable, and have identical size. NOT constexpr.
147 detail::bit_cast_union<To, From> ret;
148 memmove(&ret.source, &from,
sizeof(ret.source));