WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
wpi::memory::allocator_reference< RawAllocator > Class Template Reference

An alias template for allocator_storage using the reference_storage policy. More...

#include <wpi/memory/allocator_storage.hpp>

Inheritance diagram for wpi::memory::allocator_reference< RawAllocator >:
wpi::memory::allocator_storage< reference_storage< RawAllocator >, no_mutex >

Related Symbols

(Note that these are not member symbols.)

template<class RawAllocator >
auto make_allocator_reference (RawAllocator &&allocator) noexcept -> allocator_reference< typename std::decay< RawAllocator >::type >
 

Additional Inherited Members

- Public Types inherited from wpi::memory::allocator_storage< reference_storage< RawAllocator >, no_mutex >
using allocator_type
 
using storage_policy
 
using mutex
 
using is_stateful
 
- Public Member Functions inherited from wpi::memory::allocator_storage< reference_storage< RawAllocator >, no_mutex >
 allocator_storage ()=default
 
 allocator_storage (Alloc &&alloc,)
 
 allocator_storage (const allocator_storage< OtherPolicy, no_mutex > &other,)
 
bool is_composable () const noexcept
 
 allocator_storage (allocator_storage &&other) noexcept
 
allocator_storageoperator= (allocator_storage &&other) noexcept
 
 allocator_storage (const allocator_storage &)=default
 
allocator_storageoperator= (const allocator_storage &)=default
 
void * allocate_node (std::size_t size, std::size_t alignment)
 
void * allocate_array (std::size_t count, std::size_t size, std::size_t alignment)
 
void deallocate_node (void *ptr, std::size_t size, std::size_t alignment) noexcept
 
void deallocate_array (void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept
 
std::size_t max_node_size () const
 
std::size_t max_array_size () const
 
std::size_t max_alignment () const
 
void * try_allocate_node (std::size_t size, std::size_t alignment) noexcept
 
void * try_allocate_array (std::size_t count, std::size_t size, std::size_t alignment) noexcept
 
bool try_deallocate_node (void *ptr, std::size_t size, std::size_t alignment) noexcept
 
bool try_deallocate_array (void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept
 
auto get_allocator () noexcept -> decltype(std::declval< storage_policy >().get_allocator())
 
auto get_allocator () const noexcept -> decltype(std::declval< const storage_policy >().get_allocator())
 
auto lock () noexcept -> implementation_defined
 
auto lock () const noexcept -> implementation_defined
 

Detailed Description

template<class RawAllocator>
class wpi::memory::allocator_reference< RawAllocator >

An alias template for allocator_storage using the reference_storage policy.

It will store a reference to the given allocator type. The tag type any_allocator enables type-erasure. Wrap the allocator in a thread_safe_allocator if you want thread safety.

Friends And Related Symbol Documentation

◆ make_allocator_reference()

template<class RawAllocator >
auto make_allocator_reference ( RawAllocator && allocator) -> allocator_reference<typename std::decay<RawAllocator>::type>
related
Returns:
A new allocator_reference object by forwarding the allocator to the constructor.

The documentation for this class was generated from the following file: