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

An alias template for std_allocator using a type-erased RawAllocator. More...

#include <wpi/memory/std_allocator.hpp>

Inheritance diagram for wpi::memory::any_std_allocator< T >:
wpi::memory::std_allocator< T, any_allocator >

Related Symbols

(Note that these are not member symbols.)

template<typename T , class RawAllocator >
any_std_allocator< T > make_any_std_allocator (RawAllocator &&allocator) noexcept
 

Additional Inherited Members

- Public Types inherited from wpi::memory::std_allocator< T, any_allocator >
using value_type
 
using pointer
 
using const_pointer
 
using reference
 
using const_reference
 
using size_type
 
using difference_type
 
using propagate_on_container_swap
 
using propagate_on_container_move_assignment
 
using propagate_on_container_copy_assignment
 
using allocator_type
 
- Public Member Functions inherited from wpi::memory::std_allocator< T, any_allocator >
 std_allocator () noexcept
 
 std_allocator (RawAlloc &alloc,) noexcept
 
 std_allocator (const RawAlloc &alloc,) noexcept
 
 std_allocator (const alloc_reference &alloc) noexcept
 
 std_allocator (const allocator_storage< StoragePolicy, OtherMut > &)=delete
 
std_allocator< T, any_allocatorselect_on_container_copy_construction () const
 
pointer allocate (size_type n, void *=nullptr)
 
void deallocate (pointer p, size_type n) noexcept
 
void construct (U *p, Args &&... args)
 
void destroy (U *p) noexcept
 
size_type max_size () const noexcept
 
 std_allocator (const std_allocator< U, any_allocator > &alloc) noexcept
 
 std_allocator (std_allocator< U, any_allocator > &alloc) noexcept
 
auto get_allocator () noexcept -> decltype(std::declval< alloc_reference >().get_allocator())
 
auto get_allocator () const noexcept -> decltype(std::declval< const alloc_reference >().get_allocator())
 

Detailed Description

template<typename T>
class wpi::memory::any_std_allocator< T >

An alias template for std_allocator using a type-erased RawAllocator.

This is the same as using a std_allocator with the tag type any_allocator. The implementation is optimized to call fewer virtual functions.

Friends And Related Symbol Documentation

◆ make_any_std_allocator()

template<typename T , class RawAllocator >
any_std_allocator< T > make_any_std_allocator ( RawAllocator && allocator)
related
Returns:
A new any_std_allocator for a given type using a certain allocator object.

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