xentara-utils v2.0.4
The Xentara Utility Library
|
A compound class pairing a possibly empty allocator with data. More...
#include <xentara/utils/tools/DataAllocatorPair.hpp>
Public Member Functions | |
DataAllocatorPair ()=default | |
Default constructor. | |
constexpr | DataAllocatorPair (const Allocator &allocator) noexcept(std::is_nothrow_copy_constructible_v< Allocator > &&std::is_nothrow_constructible_v< Data >) |
Constructor that initializes the allocator. | |
constexpr | DataAllocatorPair (Allocator &&allocator) noexcept(std::is_nothrow_move_constructible_v< Allocator > &&std::is_nothrow_constructible_v< Data >) |
Constructor that initializes the allocator. | |
constexpr auto | allocator () noexcept -> Allocator & |
Gets the allocator. | |
constexpr auto | allocator () const noexcept -> const Allocator & |
Gets the allocator. | |
constexpr auto | data () noexcept -> Data & |
Gets the data. | |
constexpr auto | data () const noexcept -> const Data & |
Gets the data. | |
constexpr auto | operator* () noexcept -> Data & |
Access to the data. | |
constexpr auto | operator* () const noexcept -> const Data & |
Access to the data. | |
constexpr auto | operator-> () noexcept -> Data * |
Access to a member of the data. | |
constexpr auto | operator-> () const noexcept -> const Data * |
Access to a member of the data. | |
A compound class pairing a possibly empty allocator with data.
This class combines an allocator with some data, for use in collection classes and the like. If the allocator class is empty, the space for the allocator is optimized out, either using the [[no_unique_address]] attribute if the compiler supports it, or using empty base optimation if it doesn’t.
|
default |
Default constructor.
|
explicitconstexprnoexcept |
Constructor that initializes the allocator.
|
explicitconstexprnoexcept |
Constructor that initializes the allocator.
|
constexprnoexcept |
Gets the allocator.
|
constexprnoexcept |
Gets the allocator.
|
constexprnoexcept |
Gets the data.
|
constexprnoexcept |
Gets the data.
|
constexprnoexcept |
Access to the data.
|
constexprnoexcept |
Access to the data.
|
constexprnoexcept |
Access to a member of the data.
|
constexprnoexcept |
Access to a member of the data.