tmp/tmpyvdwo60k/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### General <a id="default.allocator.general">[[default.allocator.general]]</a>
|
| 2 |
+
|
| 3 |
+
All specializations of the default allocator meet the allocator
|
| 4 |
+
completeness requirements [[allocator.requirements.completeness]].
|
| 5 |
+
|
| 6 |
+
``` cpp
|
| 7 |
+
namespace std {
|
| 8 |
+
template<class T> class allocator {
|
| 9 |
+
public:
|
| 10 |
+
using value_type = T;
|
| 11 |
+
using size_type = size_t;
|
| 12 |
+
using difference_type = ptrdiff_t;
|
| 13 |
+
using propagate_on_container_move_assignment = true_type;
|
| 14 |
+
|
| 15 |
+
constexpr allocator() noexcept;
|
| 16 |
+
constexpr allocator(const allocator&) noexcept;
|
| 17 |
+
template<class U> constexpr allocator(const allocator<U>&) noexcept;
|
| 18 |
+
constexpr ~allocator();
|
| 19 |
+
constexpr allocator& operator=(const allocator&) = default;
|
| 20 |
+
|
| 21 |
+
[[nodiscard]] constexpr T* allocate(size_t n);
|
| 22 |
+
[[nodiscard]] constexpr allocation_result<T*> allocate_at_least(size_t n);
|
| 23 |
+
constexpr void deallocate(T* p, size_t n);
|
| 24 |
+
};
|
| 25 |
+
}
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
`allocator_traits<allocator<T>>::is_always_equal::value`
|
| 29 |
+
|
| 30 |
+
is `true` for any `T`.
|
| 31 |
+
|