|
QuickCppLib 0.10
Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!
|
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...
#include "in_place_detach_attach.hpp"
Public Types | |
| using | element_type = typename _base::element_type |
| The index type. | |
| using | value_type = typename _base::value_type |
| The value type. | |
| using | reference = typename _base::reference |
| The reference type. | |
| using | pointer = typename _base::pointer |
| The pointer type. | |
| using | const_reference = typename _base::const_reference |
| The const reference type. | |
| using | const_pointer = typename _base::const_pointer |
| The const pointer type. | |
| using | iterator = typename _base::iterator |
| The iterator type. | |
| using | reverse_iterator = typename _base::reverse_iterator |
| The const iterator type. | |
| using | difference_type = typename _base::difference_type |
| The const reverse iterator type. | |
Public Member Functions | |
| constexpr | attached () |
| Default constructor. | |
| attached (const attached &)=delete | |
| constexpr | attached (attached &&o) noexcept |
| Move constructs the instance, leaving the source empty. | |
| attached & | operator= (const attached &)=delete |
| constexpr attached & | operator= (attached &&o) noexcept |
| ~attached () | |
Detaches the array of T, if not empty. | |
| template<class U , typename = decltype( in_place_attach<T>(std::declval<U>()) )> | |
| constexpr | attached (U &&v) |
Implicitly construct from anything for which in_place_attach<T>() is valid. | |
| constexpr | attached (adopt_t, _base v) |
| Explicitly construct from a span of already attached objects. | |
| constexpr _base | as_span () const noexcept |
Returns the attached region as a plain span of T | |
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.
| using quickcpplib::_xxx::in_place_attach_detach::attached< T >::element_type = typename _base::element_type |
The index type.
The element type
| using quickcpplib::_xxx::in_place_attach_detach::attached< T >::value_type = typename _base::value_type |
The value type.
| using quickcpplib::_xxx::in_place_attach_detach::attached< T >::reference = typename _base::reference |
The reference type.
| using quickcpplib::_xxx::in_place_attach_detach::attached< T >::pointer = typename _base::pointer |
The pointer type.
| using quickcpplib::_xxx::in_place_attach_detach::attached< T >::const_reference = typename _base::const_reference |
The const reference type.
| using quickcpplib::_xxx::in_place_attach_detach::attached< T >::const_pointer = typename _base::const_pointer |
The const pointer type.
| using quickcpplib::_xxx::in_place_attach_detach::attached< T >::iterator = typename _base::iterator |
The iterator type.
| using quickcpplib::_xxx::in_place_attach_detach::attached< T >::reverse_iterator = typename _base::reverse_iterator |
The const iterator type.
The reverse iterator type
| using quickcpplib::_xxx::in_place_attach_detach::attached< T >::difference_type = typename _base::difference_type |
The const reverse iterator type.
The difference type
|
inlineconstexpr |
Default constructor.
|
delete |
|
inlineconstexprnoexcept |
Move constructs the instance, leaving the source empty.
|
inline |
Detaches the array of T, if not empty.
|
inlineconstexpr |
Implicitly construct from anything for which in_place_attach<T>() is valid.
|
inlineexplicitconstexpr |
Explicitly construct from a span of already attached objects.
|
delete |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Returns the attached region as a plain span of T