class template
std::allocator
- Scope
std- cppreference
- std::allocator
Synopsis
template<class T>
class allocator;Member types
| Name | Declaration |
|---|---|
difference_typetype alias · member type | = ptrdiff_t |
propagate_on_container_move_assignmenttype alias · member type | = true_type |
size_typetype alias · member type | = size_t |
value_typetype alias · member type | = T |
Member functions
| Name | Declaration |
|---|---|
allocatorconstructor · 3 overloads | allocator() +2 more |
~allocatordestructor | ~allocator() |
operator=operator | allocator& operator=(const allocator& other) |
allocatemember function | T* allocate(size_t n) |
allocate_at_leastmember function | allocation_result<T*> allocate_at_least(size_t n) |
deallocatemember function | void deallocate(T* p, size_t n) |