|
QuickCppLib 0.10
Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!
|
Namespaces | |
| namespace | traits |
| Namespace for user specialised traits. | |
| namespace | detail |
Classes | |
| struct | adopt_t |
| class | attached |
| An RAII refinement of span<T> for automatically calling in_place_attach() and in_place_detach() on an input array of T. Move-only, detaches only on final object destruction. More... | |
Functions | |
| template<class T, typename = decltype(detach_cast(std::declval<T>()))> | |
| constexpr auto | in_place_detach (quickcpplib::_xxx::span::span< T > objects, detail::default_cast_operator_overload={}) noexcept |
| An ADL customisation point for the in-place detachment of an array of live T objects into an array of bytes representing their detached object representations. This overload is available if detach_cast() is available for T. | |
| template<class T, typename = decltype(attach_cast<T>(std::declval< quickcpplib::_xxx::detach_cast::byte_array_reference<T>>()))> | |
| constexpr quickcpplib::_xxx::span::span< T > | in_place_attach (quickcpplib::_xxx::span::span< quickcpplib::_xxx::byte::byte > bytearray, detail::default_cast_operator_overload={}) noexcept |
| An ADL customisation point for the in-place attachment of previously detached object representations, back into an array of live T objects. This overload is available if attach_cast() is available for T. | |
| 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! | |
Variables | |
| constexpr adopt_t | adopt {} |
|
inlineconstexprnoexcept |
An ADL customisation point for the in-place detachment of an array of live T objects into an array of bytes representing their detached object representations. This overload is available if detach_cast() is available for T.
|
inlineconstexprnoexcept |
An ADL customisation point for the in-place attachment of previously detached object representations, back into an array of live T objects. This overload is available if attach_cast() is available for T.
|
inlineconstexprnoexcept |
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!
Implementation notes: If the output type is bit castable, bit casting is used to implement attachment using defined behaviour in C++ 20. Otherwise traits::enable_reinterpret_attach_cast<T> is used to determine whether to implement attachment using undefined behaviour by reinterpret casting.
|
constexpr |