WPILibC++ 2025.1.1
|
A StoragePolicy that stores a reference to an allocator. More...
#include <wpi/memory/allocator_storage.hpp>
Public Types | |
using | allocator_type = typename allocator_traits<RawAllocator>::allocator_type |
Public Member Functions | |
reference_storage () noexcept=default | |
Default constructor. | |
reference_storage (const allocator_type &alloc) noexcept | |
reference_storage (allocator_type &alloc) noexcept | |
operator bool () const noexcept | |
allocator_type & | get_allocator () const noexcept |
reference_storage (const reference_storage &) noexcept=default | |
reference_storage & | operator= (const reference_storage &) noexcept=default |
Protected Member Functions | |
~reference_storage () noexcept=default | |
bool | is_composable () const noexcept |
A StoragePolicy that stores a reference to an allocator.
For stateful allocators it only stores a pointer to an allocator object and copying/moving only copies the pointer. For stateless allocators it does not store anything, an allocator will be constructed as needed. For allocators that are already shared (determined through is_shared_allocator) it will store the allocator type directly.
using wpi::memory::reference_storage< RawAllocator >::allocator_type = typename allocator_traits<RawAllocator>::allocator_type |
|
defaultnoexcept |
Default constructor.
|
inlinenoexcept |
RawAllocator
is stateless or shared.
|
inlinenoexcept |
|
defaultnoexcept |
allocator_reference
object. Only copies the pointer to it in the stateful case.
|
protecteddefaultnoexcept |
|
inlinenoexcept |
|
inlineprotectednoexcept |
|
inlineexplicitnoexcept |
|
defaultnoexcept |