Template Class PoolAllocator

Nested Relationships

Nested Types

Class Documentation

template<class T, class R = PoolResource<>>
class PoolAllocator

the standard allocator of objects of type T over the resource R

Public Types

using value_type = T
using size_type = std::size_t
using difference_type = std::ptrdiff_t
using propagate_on_container_copy_assignment = std::true_type
using propagate_on_container_move_assignment = std::true_type
using propagate_on_container_swap = std::true_type
using is_always_equal = std::false_type

Public Functions

inline PoolAllocator(R &r) noexcept

the allocator of the resource r

inline PoolAllocator(void) noexcept

the allocator of the default resource of R, if it has one

template<class U>
inline PoolAllocator(const PoolAllocator<U, R> &o) noexcept
T *allocate(std::size_t n)

room for n objects

void deallocate(T *p, std::size_t n)
Pre:

p was given by allocate( n ) of an allocator equal to this one

inline R *resource(void) const noexcept

the resource

template<class U>
inline bool operator==(const PoolAllocator<U, R> &o) const noexcept
template<class U>
struct rebind

Public Types

using other = PoolAllocator<U, R>