Hybrid ICN (hICN) plugin  v21.06-rc0-4-g18fa668
Classes | Public Types | Public Member Functions | Friends | List of all members
utils::STLAllocator< T, Pool > Class Template Reference

#include <fixed_block_allocator.h>

Classes

struct  rebind
 

Public Types

using size_type = std::size_t
 
using difference_type = ptrdiff_t
 
using pointer = T *
 
using const_pointer = const T *
 
using reference = T &
 
using const_reference = const T &
 
using value_type = T
 

Public Member Functions

 STLAllocator (pointer memory, Pool *memory_pool)
 
template<typename U >
 STLAllocator (const STLAllocator< U, Pool > &other)
 
pointer address (reference x) const
 
const_pointer address (const_reference x) const
 
pointer allocate (size_type n, pointer hint=0)
 
void deallocate (pointer p, size_type n)
 
template<typename... Args>
void construct (pointer p, Args &&... args)
 
void destroy (pointer p)
 

Friends

template<typename U , typename P >
class STLAllocator
 

Detailed Description

template<typename T, typename Pool>
class utils::STLAllocator< T, Pool >

STL Allocator trait to be used with allocate_shared.

Friends And Related Function Documentation

◆ STLAllocator

template<typename T , typename Pool >
template<typename U , typename P >
friend class STLAllocator
friend

If STLAllocator is rebound to another type (!= T) using copy constructor, we may need to access private members of the source allocator to copy memory and pool.


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