sparrow 0.9.0
Loading...
Searching...
No Matches
sparrow::any_allocator< T > Class Template Reference

#include <allocator.hpp>

Public Types

using value_type = T
 
template<allocator A>
using allocator_value_type = typename std::allocator_traits<std::decay_t<A>>::value_type
 

Public Member Functions

 any_allocator ()
 
 any_allocator (const any_allocator &rhs)
 
 any_allocator (any_allocator &&) noexcept
 
any_allocatoroperator= (const any_allocator &rhs)=delete
 
any_allocatoroperator= (any_allocator &&rhs)=delete
 
template<class A>
requires ( not std::same_as<std::remove_cvref_t<A>, any_allocator> and allocator<A> and std::same_as<allocator_value_type<A>, T> )
 any_allocator (A &&alloc)
 
T * allocate (std::size_t n)
 
void deallocate (T *p, std::size_t n)
 
any_allocator select_on_container_copy_construction () const
 
bool equal (const any_allocator &rhs) const
 

Detailed Description

template<class T>
class sparrow::any_allocator< T >

Definition at line 64 of file allocator.hpp.

Member Typedef Documentation

◆ allocator_value_type

template<class T>
template<allocator A>
using sparrow::any_allocator< T >::allocator_value_type = typename std::allocator_traits<std::decay_t<A>>::value_type

Definition at line 71 of file allocator.hpp.

◆ value_type

template<class T>
using sparrow::any_allocator< T >::value_type = T

Definition at line 68 of file allocator.hpp.

Constructor & Destructor Documentation

◆ any_allocator() [1/4]

template<class T>
sparrow::any_allocator< T >::any_allocator ( )

Definition at line 204 of file allocator.hpp.

Here is the caller graph for this function:

◆ any_allocator() [2/4]

template<class T>
sparrow::any_allocator< T >::any_allocator ( const any_allocator< T > & rhs)

Definition at line 210 of file allocator.hpp.

Here is the call graph for this function:

◆ any_allocator() [3/4]

template<class T>
sparrow::any_allocator< T >::any_allocator ( any_allocator< T > && rhs)
noexcept

Definition at line 216 of file allocator.hpp.

Here is the call graph for this function:

◆ any_allocator() [4/4]

template<class T>
template<class A>
requires ( not std::same_as<std::remove_cvref_t<A>, any_allocator> and allocator<A> and std::same_as<allocator_value_type<A>, T> )
sparrow::any_allocator< T >::any_allocator ( A && alloc)
inline

Definition at line 81 of file allocator.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ allocate()

template<class T>
T * sparrow::any_allocator< T >::allocate ( std::size_t n)
nodiscard

Definition at line 231 of file allocator.hpp.

◆ deallocate()

template<class T>
void sparrow::any_allocator< T >::deallocate ( T * p,
std::size_t n )

Definition at line 253 of file allocator.hpp.

◆ equal()

template<class T>
bool sparrow::any_allocator< T >::equal ( const any_allocator< T > & rhs) const
nodiscard

Definition at line 278 of file allocator.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

template<class T>
any_allocator & sparrow::any_allocator< T >::operator= ( any_allocator< T > && rhs)
delete
Here is the call graph for this function:

◆ operator=() [2/2]

template<class T>
any_allocator & sparrow::any_allocator< T >::operator= ( const any_allocator< T > & rhs)
delete
Here is the call graph for this function:

◆ select_on_container_copy_construction()

template<class T>
any_allocator< T > sparrow::any_allocator< T >::select_on_container_copy_construction ( ) const
nodiscard

Definition at line 272 of file allocator.hpp.

Here is the call graph for this function:

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