Template Class Allocator

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

template<class T, class MemResProvider = MemResGlobal>
class Allocator : public c4::detail::_AllocatorUtil<MemResGlobal>

An allocator is simply a proxy to a memory resource.

Param T:

Param MemResProvider:

Public Types

using impl_type = detail::_AllocatorUtil<MemResProvider>
using value_type = T
using pointer = T*
using const_pointer = T const*
using reference = T&
using const_reference = T const&
using size_type = size_t
using difference_type = std::ptrdiff_t
using propagate_on_container_move_assigment = std::true_type

Public Functions

template<class U, class MRProv>
inline bool operator==(Allocator<U, MRProv> const &that) const
template<class U, class MRProv>
inline bool operator!=(Allocator<U, MRProv> const &that) const
template<class U>
inline rebind<U>::other rebound()
inline Allocator()
template<class U>
inline Allocator(Allocator<U, MemResProvider> const &that)
Allocator(Allocator const&) = default
Allocator(Allocator&&) = default
Allocator &operator=(Allocator const&) = default
Allocator &operator=(Allocator&&) = default
inline Allocator select_on_container_copy_construct() const

returns a default-constructed polymorphic allocator object

inline T *allocate(size_t num_objs, size_t alignment = alignof(T))
inline void deallocate(T *ptr, size_t num_objs, size_t alignment = alignof(T))
inline T *reallocate(T *ptr, size_t oldnum, size_t newnum, size_t alignment = alignof(T))

Friends

friend class Allocator
template<class U>
struct rebind

Public Types

using other = Allocator<U, MemResProvider>