tmp/tmpnhz8cahk/{from.md → to.md}
RENAMED
|
@@ -18,12 +18,12 @@ namespace std {
|
|
| 18 |
constexpr allocator(const allocator&) noexcept;
|
| 19 |
template<class U> constexpr allocator(const allocator<U>&) noexcept;
|
| 20 |
constexpr ~allocator();
|
| 21 |
constexpr allocator& operator=(const allocator&) = default;
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
| 25 |
constexpr void deallocate(T* p, size_t n);
|
| 26 |
};
|
| 27 |
}
|
| 28 |
```
|
| 29 |
|
|
@@ -39,11 +39,11 @@ concurrent calls to those member functions from different threads. Calls
|
|
| 39 |
to these functions that allocate or deallocate a particular unit of
|
| 40 |
storage shall occur in a single total order, and each such deallocation
|
| 41 |
call shall happen before the next allocation (if any) in this order.
|
| 42 |
|
| 43 |
``` cpp
|
| 44 |
-
|
| 45 |
```
|
| 46 |
|
| 47 |
*Mandates:* `T` is not an incomplete type [[term.incomplete.type]].
|
| 48 |
|
| 49 |
*Returns:* A pointer to the initial element of an array of `n` `T`.
|
|
@@ -56,11 +56,11 @@ storage cannot be obtained.
|
|
| 56 |
`::operator new` [[new.delete]], but it is unspecified when or how often
|
| 57 |
this function is called. This function starts the lifetime of the array
|
| 58 |
object, but not that of any of the array elements.
|
| 59 |
|
| 60 |
``` cpp
|
| 61 |
-
|
| 62 |
```
|
| 63 |
|
| 64 |
*Mandates:* `T` is not an incomplete type [[term.incomplete.type]].
|
| 65 |
|
| 66 |
*Returns:* `allocation_result<T*>{ptr, count}`, where `ptr` is a pointer
|
|
|
|
| 18 |
constexpr allocator(const allocator&) noexcept;
|
| 19 |
template<class U> constexpr allocator(const allocator<U>&) noexcept;
|
| 20 |
constexpr ~allocator();
|
| 21 |
constexpr allocator& operator=(const allocator&) = default;
|
| 22 |
|
| 23 |
+
constexpr T* allocate(size_t n);
|
| 24 |
+
constexpr allocation_result<T*> allocate_at_least(size_t n);
|
| 25 |
constexpr void deallocate(T* p, size_t n);
|
| 26 |
};
|
| 27 |
}
|
| 28 |
```
|
| 29 |
|
|
|
|
| 39 |
to these functions that allocate or deallocate a particular unit of
|
| 40 |
storage shall occur in a single total order, and each such deallocation
|
| 41 |
call shall happen before the next allocation (if any) in this order.
|
| 42 |
|
| 43 |
``` cpp
|
| 44 |
+
constexpr T* allocate(size_t n);
|
| 45 |
```
|
| 46 |
|
| 47 |
*Mandates:* `T` is not an incomplete type [[term.incomplete.type]].
|
| 48 |
|
| 49 |
*Returns:* A pointer to the initial element of an array of `n` `T`.
|
|
|
|
| 56 |
`::operator new` [[new.delete]], but it is unspecified when or how often
|
| 57 |
this function is called. This function starts the lifetime of the array
|
| 58 |
object, but not that of any of the array elements.
|
| 59 |
|
| 60 |
``` cpp
|
| 61 |
+
constexpr allocation_result<T*> allocate_at_least(size_t n);
|
| 62 |
```
|
| 63 |
|
| 64 |
*Mandates:* `T` is not an incomplete type [[term.incomplete.type]].
|
| 65 |
|
| 66 |
*Returns:* `allocation_result<T*>{ptr, count}`, where `ptr` is a pointer
|