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

The default specialization of the allocator_traits for a RawAllocator. More...

#include <wpi/memory/allocator_traits.hpp>

Public Types

using allocator_type = traits_detail::allocator_type<Allocator>
 
using is_stateful
 

Static Public Member Functions

static void * allocate_node (allocator_type &state, std::size_t size, std::size_t alignment)
 
static void * allocate_array (allocator_type &state, std::size_t count, std::size_t size, std::size_t alignment)
 
static void deallocate_node (allocator_type &state, void *node, std::size_t size, std::size_t alignment) noexcept
 
static void deallocate_array (allocator_type &state, void *array, std::size_t count, std::size_t size, std::size_t alignment) noexcept
 
static std::size_t max_node_size (const allocator_type &state)
 
static std::size_t max_array_size (const allocator_type &state)
 
static std::size_t max_alignment (const allocator_type &state)
 

Detailed Description

template<class Allocator>
class wpi::memory::allocator_traits< Allocator >

The default specialization of the allocator_traits for a RawAllocator.

See the last link for the requirements on types that do not specialize this class and the interface documentation. Any specialization must provide the same interface.

Member Typedef Documentation

◆ allocator_type

template<class Allocator >
using wpi::memory::allocator_traits< Allocator >::allocator_type = traits_detail::allocator_type<Allocator>

◆ is_stateful

template<class Allocator >
using wpi::memory::allocator_traits< Allocator >::is_stateful
Initial value:
decltype(traits_detail::is_stateful<Allocator>(traits_detail::full_concept{}))
auto is_stateful(full_concept) -> decltype(typename Allocator::is_stateful{})

Member Function Documentation

◆ allocate_array()

template<class Allocator >
static void * wpi::memory::allocator_traits< Allocator >::allocate_array ( allocator_type & state,
std::size_t count,
std::size_t size,
std::size_t alignment )
inlinestatic

◆ allocate_node()

template<class Allocator >
static void * wpi::memory::allocator_traits< Allocator >::allocate_node ( allocator_type & state,
std::size_t size,
std::size_t alignment )
inlinestatic

◆ deallocate_array()

template<class Allocator >
static void wpi::memory::allocator_traits< Allocator >::deallocate_array ( allocator_type & state,
void * array,
std::size_t count,
std::size_t size,
std::size_t alignment )
inlinestaticnoexcept

◆ deallocate_node()

template<class Allocator >
static void wpi::memory::allocator_traits< Allocator >::deallocate_node ( allocator_type & state,
void * node,
std::size_t size,
std::size_t alignment )
inlinestaticnoexcept

◆ max_alignment()

template<class Allocator >
static std::size_t wpi::memory::allocator_traits< Allocator >::max_alignment ( const allocator_type & state)
inlinestatic

◆ max_array_size()

template<class Allocator >
static std::size_t wpi::memory::allocator_traits< Allocator >::max_array_size ( const allocator_type & state)
inlinestatic

◆ max_node_size()

template<class Allocator >
static std::size_t wpi::memory::allocator_traits< Allocator >::max_node_size ( const allocator_type & state)
inlinestatic

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