[default.allocator.general] (original) (raw)

20 Memory management library [mem]

20.2 Memory [memory]

20.2.10 The default allocator [default.allocator]

20.2.10.1 General [default.allocator.general]

namespace std { template<class T> class allocator { public: using value_type = T;using size_type = size_t;using difference_type = ptrdiff_t;using propagate_on_container_move_assignment = true_type;constexpr allocator() noexcept;constexpr allocator(const allocator&) noexcept;template<class U> constexpr allocator(const allocator<U>&) noexcept;constexpr ~allocator();constexpr allocator& operator=(const allocator&) = default;constexpr T* allocate(size_t n);constexpr allocation_result<T*> allocate_at_least(size_t n);constexpr void deallocate(T* p, size_t n);};}

allocator_traits<allocator<T>>​::​is_always_equal​::​valueis true for any T.