WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
allocator_traits.hpp File Reference

The default specialization of the wpi::memory::allocator_traits. More...

#include <cstddef>
#include <type_traits>
#include "detail/align.hpp"
#include "detail/utility.hpp"
#include "config.hpp"

Go to the source code of this file.

Classes

struct  wpi::memory::detail::check_standard_allocator< Allocator >
 
struct  wpi::memory::allocator_is_raw_allocator< Allocator >
 Traits class that checks whether or not a standard Allocator can be used as RawAllocator. More...
 
struct  wpi::memory::allocator_is_raw_allocator< std::allocator< T > >
 Specialization of allocator_is_raw_allocator that allows std::allocator again. More...
 
struct  wpi::memory::traits_detail::error
 
struct  wpi::memory::traits_detail::std_concept
 
struct  wpi::memory::traits_detail::min_concept
 
struct  wpi::memory::traits_detail::full_concept
 
struct  wpi::memory::traits_detail::invalid_allocator_concept< T >
 
struct  wpi::memory::traits_detail::allocator_rebinder< Allocator, T >
 
struct  wpi::memory::traits_detail::allocator_rebinder< Alloc< U, Args... >, T >
 
struct  wpi::memory::traits_detail::allocator_type_impl< Allocator >
 
struct  wpi::memory::traits_detail::is_stateful_impl< Allocator, true >
 
struct  wpi::memory::traits_detail::is_stateful_impl< Allocator, false >
 
class  wpi::memory::allocator_traits< Allocator >
 The default specialization of the allocator_traits for a RawAllocator. More...
 
struct  wpi::memory::detail::has_invalid_alloc_function< T >
 
struct  wpi::memory::detail::has_invalid_dealloc_function< T >
 
struct  wpi::memory::detail::is_raw_allocator< T, DefaultTraits >
 
struct  wpi::memory::detail::is_raw_allocator< T, std::integral_constant< bool, true > >
 
struct  wpi::memory::is_raw_allocator< T >
 Traits that check whether a type models concept RawAllocator. More...
 
class  wpi::memory::composable_allocator_traits< Allocator >
 The default specialization of the composable_allocator_traits for a ComposableAllocator. More...
 
struct  wpi::memory::detail::has_invalid_try_alloc_function< T >
 
struct  wpi::memory::detail::has_invalid_try_dealloc_function< T >
 
struct  wpi::memory::detail::is_composable_allocator< T, DefaultTraits >
 
struct  wpi::memory::detail::is_composable_allocator< T, std::integral_constant< bool, true > >
 
struct  wpi::memory::is_composable_allocator< T >
 Traits that check whether a type models concept ComposableAllocator. More...
 

Namespaces

namespace  wpi
 Foonathan namespace.
 
namespace  wpi::memory
 Memory namespace.
 
namespace  wpi::memory::detail
 
namespace  wpi::memory::traits_detail
 

Typedefs

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

Functions

template<class Allocator >
std::true_type wpi::memory::detail::has_construct (int,)
 
template<class Allocator >
std::false_type wpi::memory::detail::has_construct (short)
 
template<class Allocator >
std::true_type wpi::memory::detail::has_destroy (int,)
 
template<class Allocator >
std::false_type wpi::memory::detail::has_destroy (short)
 
template<class Allocator >
auto wpi::memory::traits_detail::rebind_impl (int) -> typename Allocator::template rebind< char >::other &
 
template<class Allocator , typename = typename Allocator::value_type>
auto wpi::memory::traits_detail::rebind_impl (char) -> typename allocator_rebinder< Allocator, char >::type
 
template<class Allocator >
auto wpi::memory::traits_detail::rebind_impl (...) -> Allocator &
 
template<class Allocator >
auto wpi::memory::traits_detail::is_stateful (full_concept) -> decltype(typename Allocator::is_stateful{})
 
template<class Allocator >
auto wpi::memory::traits_detail::is_stateful (min_concept) -> typename is_stateful_impl< Allocator, std::is_empty< Allocator >::value >::type
 
template<class Allocator >
auto wpi::memory::traits_detail::allocate_node (full_concept, Allocator &alloc, std::size_t size, std::size_t alignment) -> WPI_AUTO_RETURN_TYPE(alloc.allocate_node(size, alignment), void *) template< class Allocator > auto allocate_node(std_concept, Allocator &alloc, std::size_t size, std::size_t) -> WPI_AUTO_RETURN(static_cast< void * >(alloc.allocate(size))) template< class Allocator > error allocate_node(error, Allocator &, std::size_t, std::size_t)
 
template<class Allocator >
auto wpi::memory::traits_detail::deallocate_node (full_concept, Allocator &alloc, void *ptr, std::size_t size, std::size_t alignment) noexcept -> WPI_AUTO_RETURN_TYPE(alloc.deallocate_node(ptr, size, alignment), void) template< class Allocator > auto deallocate_node(std_concept, Allocator &alloc, void *ptr, std::size_t size, std::size_t) noexcept -> WPI_AUTO_RETURN_TYPE(alloc.deallocate(static_cast< char * >(ptr), size), void) template< class Allocator > error deallocate_node(error, Allocator &, void *, std::size_t, std::size_t)
 
template<class Allocator >
auto wpi::memory::traits_detail::allocate_array (full_concept, Allocator &alloc, std::size_t count, std::size_t size, std::size_t alignment) -> WPI_AUTO_RETURN_TYPE(alloc.allocate_array(count, size, alignment), void *) template< class Allocator > void *allocate_array(min_concept, Allocator &alloc, std::size_t count, std::size_t size, std::size_t alignment)
 
template<class Allocator >
auto wpi::memory::traits_detail::deallocate_array (full_concept, Allocator &alloc, void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept -> WPI_AUTO_RETURN_TYPE(alloc.deallocate_array(ptr, count, size, alignment), void) template< class Allocator > void deallocate_array(min_concept, Allocator &alloc, void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept
 
template<class Allocator >
auto wpi::memory::traits_detail::max_node_size (full_concept, const Allocator &alloc) -> WPI_AUTO_RETURN_TYPE(alloc.max_node_size(), std::size_t) template< class Allocator > std::size_t max_node_size(min_concept, const Allocator &) noexcept
 
template<class Allocator >
auto wpi::memory::traits_detail::max_array_size (full_concept, const Allocator &alloc) -> WPI_AUTO_RETURN_TYPE(alloc.max_array_size(), std::size_t) template< class Allocator > std::size_t max_array_size(min_concept, const Allocator &alloc)
 
template<class Allocator >
auto wpi::memory::traits_detail::max_alignment (full_concept, const Allocator &alloc) -> WPI_AUTO_RETURN_TYPE(alloc.max_alignment(), std::size_t) template< class Allocator > std::size_t max_alignment(min_concept, const Allocator &)
 
template<class RawAllocator >
allocator_traits< RawAllocator >::foonathan_memory_default_traits wpi::memory::detail::alloc_uses_default_traits (RawAllocator &)
 
std::false_type wpi::memory::detail::alloc_uses_default_traits (...)
 
template<class Allocator >
auto wpi::memory::traits_detail::try_allocate_node (full_concept, Allocator &alloc, std::size_t size, std::size_t alignment) noexcept -> WPI_AUTO_RETURN_TYPE(alloc.try_allocate_node(size, alignment), void *) template< class Allocator > error try_allocate_node(error, Allocator &, std::size_t, std::size_t)
 
template<class Allocator >
auto wpi::memory::traits_detail::try_deallocate_node (full_concept, Allocator &alloc, void *ptr, std::size_t size, std::size_t alignment) noexcept -> WPI_AUTO_RETURN_TYPE(alloc.try_deallocate_node(ptr, size, alignment), bool) template< class Allocator > error try_deallocate_node(error, Allocator &, void *, std::size_t, std::size_t)
 
template<class Allocator >
auto wpi::memory::traits_detail::try_allocate_array (full_concept, Allocator &alloc, std::size_t count, std::size_t size, std::size_t alignment) noexcept -> WPI_AUTO_RETURN_TYPE(alloc.try_allocate_array(count, size, alignment), void *) template< class Allocator > void *try_allocate_array(min_concept, Allocator &alloc, std::size_t count, std::size_t size, std::size_t alignment)
 
template<class Allocator >
auto wpi::memory::traits_detail::try_deallocate_array (full_concept, Allocator &alloc, void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept -> WPI_AUTO_RETURN_TYPE(alloc.try_deallocate_array(ptr, count, size, alignment), bool) template< class Allocator > bool try_deallocate_array(min_concept, Allocator &alloc, void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept
 
template<class RawAllocator >
composable_allocator_traits< RawAllocator >::foonathan_memory_default_traits wpi::memory::detail::composable_alloc_uses_default_traits (RawAllocator &)
 
std::false_type wpi::memory::detail::composable_alloc_uses_default_traits (...)
 

Detailed Description

The default specialization of the wpi::memory::allocator_traits.