Files
2025-10-25 03:02:53 +03:00

27 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[default.allocator.general]
# 20 Memory management library [[mem]](./#mem)
## 20.2 Memory [[memory]](memory#default.allocator.general)
### 20.2.10 The default allocator [[default.allocator]](default.allocator#general)
#### 20.2.10.1 General [default.allocator.general]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L1956)
All specializations of the default allocator meet the
allocator completeness requirements ([[allocator.requirements.completeness]](allocator.requirements.completeness "16.4.4.6.2Allocator completeness requirements"))[.](#1.sentence-1)
[🔗](#lib:allocator)
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); };}
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L1988)
allocator_traits<allocator<T>>::is_always_equal::value is true for any T[.](#2.sentence-1)