emlabcpp
modern opinionated embedded C++ library
emlabcpp::pmr::allocator< T > Class Template Reference

#include <allocator.h>

Public Types

using value_type = T
 

Public Member Functions

template<typename U >
 allocator (allocator< U > const &other)
 
 allocator (pmr::memory_resource &src)
 
T * allocate (std::size_t const n)
 
void deallocate (T *const p, std::size_t const n) const
 
pmr::memory_resourceget_resource ()
 

Friends

template<typename U >
class allocator
 
constexpr friend bool operator== (allocator const &lh, allocator const &rh)
 

Member Typedef Documentation

◆ value_type

template<typename T >
using emlabcpp::pmr::allocator< T >::value_type = T

Constructor & Destructor Documentation

◆ allocator() [1/2]

template<typename T >
template<typename U >
emlabcpp::pmr::allocator< T >::allocator ( allocator< U > const &  other)
inline

◆ allocator() [2/2]

template<typename T >
emlabcpp::pmr::allocator< T >::allocator ( pmr::memory_resource src)
inline

Member Function Documentation

◆ allocate()

template<typename T >
T* emlabcpp::pmr::allocator< T >::allocate ( std::size_t const  n)
inline

◆ deallocate()

template<typename T >
void emlabcpp::pmr::allocator< T >::deallocate ( T *const  p,
std::size_t const  n 
) const
inline

◆ get_resource()

template<typename T >
pmr::memory_resource& emlabcpp::pmr::allocator< T >::get_resource ( )
inline

Friends And Related Function Documentation

◆ allocator

template<typename T >
template<typename U >
friend class allocator
friend

◆ operator==

template<typename T >
constexpr friend bool operator== ( allocator< T > const &  lh,
allocator< T > const &  rh 
)
friend

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