The following members and explicit class template specialization are defined in addition to those specified in [default.allocator]:
namespace std { // specialize for void: template <> class allocator<void> { public: using value_type = void; using pointer = void*; using const_pointer = const void*; // reference-to-void members are impossible. template <class U> struct rebind { using other = allocator<U>; }; }; template <class T> class allocator { public: using size_type = size_t; using difference_type = ptrdiff_t; using pointer = T*; using const_pointer = const T*; using reference = T&; using const_reference = const T&; template <class U> struct rebind { using other = allocator<U>; }; T* address(T& x) const noexcept; const T* address(const T& x) const noexcept; T* allocate(size_t n, const void* hint); template<class U, class... Args> void construct(U* p, Args&&... args); template <class U> void destroy(U* p); size_t max_size() const noexcept; }; }
T* address(T& x) const noexcept;
const T* address(const T& x) const noexcept;
T* allocate(size_t n, const void* hint);
Returns: A pointer to the initial element of an array of storage of size n * sizeof(T), aligned appropriately for objects of type T. It is implementation-defined whether over-aligned types are supported ([basic.align]).
Remarks: The storage is obtained by calling ::operator new(std::size_t) ([new.delete]), but it is unspecified when or how often this function is called.
template <class U, class... Args>
void construct(U* p, Args&&... args);
template <class U>
void destroy(U* p);
size_t max_size() const noexcept;