- tmp/tmpvi3vx1wi/{from.md → to.md} +244 -89
tmp/tmpvi3vx1wi/{from.md → to.md}
RENAMED
|
@@ -37,11 +37,13 @@ namespace std {
|
|
| 37 |
constexpr auto to_address(const Ptr& p) noexcept; // freestanding
|
| 38 |
|
| 39 |
// [ptr.align], pointer alignment
|
| 40 |
void* align(size_t alignment, size_t size, void*& ptr, size_t& space); // freestanding
|
| 41 |
template<size_t N, class T>
|
| 42 |
-
|
|
|
|
|
|
|
| 43 |
|
| 44 |
// [obj.lifetime], explicit lifetime management
|
| 45 |
template<class T>
|
| 46 |
T* start_lifetime_as(void* p) noexcept; // freestanding
|
| 47 |
template<class T>
|
|
@@ -57,15 +59,17 @@ namespace std {
|
|
| 57 |
template<class T>
|
| 58 |
volatile T* start_lifetime_as_array(volatile void* p, size_t n) noexcept; // freestanding
|
| 59 |
template<class T>
|
| 60 |
const volatile T* start_lifetime_as_array(const volatile void* p, // freestanding
|
| 61 |
size_t n) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
// [allocator.tag], allocator argument tag
|
| 64 |
-
struct allocator_arg_t {
|
| 65 |
-
explicit allocator_arg_t() = default; // freestanding
|
| 66 |
-
};
|
| 67 |
inline constexpr allocator_arg_t allocator_arg{}; // freestanding
|
| 68 |
|
| 69 |
// [allocator.uses], uses_allocator
|
| 70 |
template<class T, class Alloc> struct uses_allocator; // freestanding
|
| 71 |
|
|
@@ -134,179 +138,287 @@ namespace std {
|
|
| 134 |
// [special.mem.concepts], special memory concepts
|
| 135 |
template<class I>
|
| 136 |
concept nothrow-input-iterator = see below; // exposition only
|
| 137 |
template<class I>
|
| 138 |
concept nothrow-forward-iterator = see below; // exposition only
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
template<class S, class I>
|
| 140 |
concept nothrow-sentinel-for = see below; // exposition only
|
|
|
|
|
|
|
| 141 |
template<class R>
|
| 142 |
concept nothrow-input-range = see below; // exposition only
|
| 143 |
template<class R>
|
| 144 |
concept nothrow-forward-range = see below; // exposition only
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
|
| 146 |
template<class NoThrowForwardIterator>
|
| 147 |
-
void uninitialized_default_construct(NoThrowForwardIterator first,
|
| 148 |
NoThrowForwardIterator last);
|
| 149 |
template<class ExecutionPolicy, class NoThrowForwardIterator>
|
| 150 |
-
void uninitialized_default_construct(ExecutionPolicy&& exec,
|
| 151 |
-
NoThrowForwardIterator first,
|
| 152 |
NoThrowForwardIterator last);
|
| 153 |
template<class NoThrowForwardIterator, class Size>
|
| 154 |
-
NoThrowForwardIterator
|
| 155 |
uninitialized_default_construct_n(NoThrowForwardIterator first, Size n); // freestanding
|
| 156 |
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size>
|
| 157 |
NoThrowForwardIterator
|
| 158 |
-
uninitialized_default_construct_n(ExecutionPolicy&& exec,
|
| 159 |
-
NoThrowForwardIterator first,
|
|
|
|
| 160 |
|
| 161 |
namespace ranges {
|
| 162 |
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
|
| 163 |
requires default_initializable<iter_value_t<I>>
|
| 164 |
-
I uninitialized_default_construct(I first, S last);
|
| 165 |
template<nothrow-forward-range R>
|
| 166 |
requires default_initializable<range_value_t<R>>
|
| 167 |
-
borrowed_iterator_t<R> uninitialized_default_construct(R&& r);
|
| 168 |
|
| 169 |
template<nothrow-forward-iterator I>
|
| 170 |
requires default_initializable<iter_value_t<I>>
|
| 171 |
-
I uninitialized_default_construct_n(I first,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
}
|
| 173 |
|
| 174 |
template<class NoThrowForwardIterator>
|
| 175 |
-
void uninitialized_value_construct(NoThrowForwardIterator first,
|
| 176 |
NoThrowForwardIterator last);
|
| 177 |
template<class ExecutionPolicy, class NoThrowForwardIterator>
|
| 178 |
-
void uninitialized_value_construct(ExecutionPolicy&& exec,
|
| 179 |
-
NoThrowForwardIterator first,
|
| 180 |
NoThrowForwardIterator last);
|
| 181 |
template<class NoThrowForwardIterator, class Size>
|
| 182 |
-
NoThrowForwardIterator
|
| 183 |
uninitialized_value_construct_n(NoThrowForwardIterator first, Size n); // freestanding
|
| 184 |
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size>
|
| 185 |
NoThrowForwardIterator
|
| 186 |
-
uninitialized_value_construct_n(ExecutionPolicy&& exec,
|
| 187 |
-
NoThrowForwardIterator first,
|
|
|
|
| 188 |
|
| 189 |
namespace ranges {
|
| 190 |
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
|
| 191 |
requires default_initializable<iter_value_t<I>>
|
| 192 |
-
I uninitialized_value_construct(I first, S last);
|
| 193 |
template<nothrow-forward-range R>
|
| 194 |
requires default_initializable<range_value_t<R>>
|
| 195 |
-
borrowed_iterator_t<R> uninitialized_value_construct(R&& r);
|
| 196 |
|
| 197 |
template<nothrow-forward-iterator I>
|
| 198 |
requires default_initializable<iter_value_t<I>>
|
| 199 |
-
I uninitialized_value_construct_n(I first,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
}
|
| 201 |
|
| 202 |
template<class InputIterator, class NoThrowForwardIterator>
|
| 203 |
-
NoThrowForwardIterator uninitialized_copy(InputIterator first,
|
| 204 |
InputIterator last,
|
| 205 |
NoThrowForwardIterator result);
|
| 206 |
template<class ExecutionPolicy, class ForwardIterator, class NoThrowForwardIterator>
|
| 207 |
-
NoThrowForwardIterator uninitialized_copy(ExecutionPolicy&& exec,
|
| 208 |
-
ForwardIterator first,
|
|
|
|
| 209 |
NoThrowForwardIterator result);
|
| 210 |
template<class InputIterator, class Size, class NoThrowForwardIterator>
|
| 211 |
-
NoThrowForwardIterator uninitialized_copy_n(InputIterator first,
|
|
|
|
| 212 |
NoThrowForwardIterator result);
|
| 213 |
template<class ExecutionPolicy, class ForwardIterator, class Size,
|
| 214 |
class NoThrowForwardIterator>
|
| 215 |
-
NoThrowForwardIterator uninitialized_copy_n(ExecutionPolicy&& exec,
|
| 216 |
-
ForwardIterator first,
|
|
|
|
| 217 |
NoThrowForwardIterator result);
|
| 218 |
|
| 219 |
namespace ranges {
|
| 220 |
template<class I, class O>
|
| 221 |
using uninitialized_copy_result = in_out_result<I, O>; // freestanding
|
| 222 |
template<input_iterator I, sentinel_for<I> S1,
|
| 223 |
nothrow-forward-iterator O, nothrow-sentinel-for<O> S2>
|
| 224 |
requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
|
| 225 |
-
uninitialized_copy_result<I, O>
|
| 226 |
uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); // freestanding
|
| 227 |
template<input_range IR, nothrow-forward-range OR>
|
| 228 |
requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
|
| 229 |
-
uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
|
| 230 |
uninitialized_copy(IR&& in_range, OR&& out_range); // freestanding
|
| 231 |
|
| 232 |
template<class I, class O>
|
| 233 |
using uninitialized_copy_n_result = in_out_result<I, O>; // freestanding
|
| 234 |
template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
|
| 235 |
requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
|
| 236 |
-
uninitialized_copy_n_result<I, O>
|
| 237 |
uninitialized_copy_n(I ifirst, iter_difference_t<I> n, // freestanding
|
| 238 |
O ofirst, S olast);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
}
|
| 240 |
|
| 241 |
template<class InputIterator, class NoThrowForwardIterator>
|
| 242 |
-
NoThrowForwardIterator uninitialized_move(InputIterator first,
|
| 243 |
InputIterator last,
|
| 244 |
NoThrowForwardIterator result);
|
| 245 |
template<class ExecutionPolicy, class ForwardIterator, class NoThrowForwardIterator>
|
| 246 |
-
NoThrowForwardIterator uninitialized_move(ExecutionPolicy&& exec,
|
| 247 |
-
ForwardIterator first,
|
|
|
|
| 248 |
NoThrowForwardIterator result);
|
| 249 |
template<class InputIterator, class Size, class NoThrowForwardIterator>
|
| 250 |
-
pair<InputIterator, NoThrowForwardIterator>
|
| 251 |
uninitialized_move_n(InputIterator first, Size n, // freestanding
|
| 252 |
NoThrowForwardIterator result);
|
| 253 |
template<class ExecutionPolicy, class ForwardIterator, class Size,
|
| 254 |
class NoThrowForwardIterator>
|
| 255 |
pair<ForwardIterator, NoThrowForwardIterator>
|
| 256 |
-
uninitialized_move_n(ExecutionPolicy&& exec,
|
| 257 |
-
ForwardIterator first, Size n,
|
|
|
|
| 258 |
|
| 259 |
namespace ranges {
|
| 260 |
template<class I, class O>
|
| 261 |
using uninitialized_move_result = in_out_result<I, O>; // freestanding
|
| 262 |
template<input_iterator I, sentinel_for<I> S1,
|
| 263 |
nothrow-forward-iterator O, nothrow-sentinel-for<O> S2>
|
| 264 |
requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
|
| 265 |
-
uninitialized_move_result<I, O>
|
| 266 |
uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); // freestanding
|
| 267 |
template<input_range IR, nothrow-forward-range OR>
|
| 268 |
requires constructible_from<range_value_t<OR>, range_rvalue_reference_t<IR>>
|
| 269 |
-
uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
|
| 270 |
uninitialized_move(IR&& in_range, OR&& out_range); // freestanding
|
| 271 |
|
| 272 |
template<class I, class O>
|
| 273 |
using uninitialized_move_n_result = in_out_result<I, O>; // freestanding
|
| 274 |
template<input_iterator I,
|
| 275 |
nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
|
| 276 |
requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
|
| 277 |
-
uninitialized_move_n_result<I, O>
|
| 278 |
uninitialized_move_n(I ifirst, iter_difference_t<I> n, // freestanding
|
| 279 |
O ofirst, S olast);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
}
|
| 281 |
|
| 282 |
template<class NoThrowForwardIterator, class T>
|
| 283 |
-
void uninitialized_fill(NoThrowForwardIterator first,
|
| 284 |
NoThrowForwardIterator last, const T& x);
|
| 285 |
template<class ExecutionPolicy, class NoThrowForwardIterator, class T>
|
| 286 |
-
void uninitialized_fill(ExecutionPolicy&& exec,
|
| 287 |
-
NoThrowForwardIterator first,
|
|
|
|
| 288 |
const T& x);
|
| 289 |
template<class NoThrowForwardIterator, class Size, class T>
|
| 290 |
-
NoThrowForwardIterator
|
| 291 |
uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x); // freestanding
|
| 292 |
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size, class T>
|
| 293 |
NoThrowForwardIterator
|
| 294 |
-
uninitialized_fill_n(ExecutionPolicy&& exec,
|
| 295 |
-
NoThrowForwardIterator first,
|
|
|
|
| 296 |
|
| 297 |
namespace ranges {
|
| 298 |
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S, class T>
|
| 299 |
requires constructible_from<iter_value_t<I>, const T&>
|
| 300 |
-
I uninitialized_fill(I first, S last, const T& x);
|
| 301 |
template<nothrow-forward-range R, class T>
|
| 302 |
requires constructible_from<range_value_t<R>, const T&>
|
| 303 |
-
borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x);
|
| 304 |
|
| 305 |
template<nothrow-forward-iterator I, class T>
|
| 306 |
requires constructible_from<iter_value_t<I>, const T&>
|
| 307 |
-
I uninitialized_fill_n(I first,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 308 |
}
|
| 309 |
|
| 310 |
// [specialized.construct], construct_at
|
| 311 |
template<class T, class... Args>
|
| 312 |
constexpr T* construct_at(T* location, Args&&... args); // freestanding
|
|
@@ -321,18 +433,19 @@ namespace std {
|
|
| 321 |
constexpr void destroy_at(T* location); // freestanding
|
| 322 |
template<class NoThrowForwardIterator>
|
| 323 |
constexpr void destroy(NoThrowForwardIterator first, // freestanding
|
| 324 |
NoThrowForwardIterator last);
|
| 325 |
template<class ExecutionPolicy, class NoThrowForwardIterator>
|
| 326 |
-
void destroy(ExecutionPolicy&& exec,
|
| 327 |
-
NoThrowForwardIterator first,
|
|
|
|
| 328 |
template<class NoThrowForwardIterator, class Size>
|
| 329 |
constexpr NoThrowForwardIterator destroy_n(NoThrowForwardIterator first, // freestanding
|
| 330 |
Size n);
|
| 331 |
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size>
|
| 332 |
-
NoThrowForwardIterator destroy_n(ExecutionPolicy&& exec,
|
| 333 |
-
NoThrowForwardIterator first, Size n);
|
| 334 |
|
| 335 |
namespace ranges {
|
| 336 |
template<destructible T>
|
| 337 |
constexpr void destroy_at(T* location) noexcept; // freestanding
|
| 338 |
|
|
@@ -344,10 +457,24 @@ namespace std {
|
|
| 344 |
constexpr borrowed_iterator_t<R> destroy(R&& r) noexcept; // freestanding
|
| 345 |
|
| 346 |
template<nothrow-input-iterator I>
|
| 347 |
requires destructible<iter_value_t<I>>
|
| 348 |
constexpr I destroy_n(I first, iter_difference_t<I> n) noexcept; // freestanding
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 349 |
}
|
| 350 |
|
| 351 |
// [unique.ptr], class template unique_ptr
|
| 352 |
template<class T> struct default_delete; // freestanding
|
| 353 |
template<class T> struct default_delete<T[]>; // freestanding
|
|
@@ -373,21 +500,25 @@ namespace std {
|
|
| 373 |
|
| 374 |
template<class T1, class D1, class T2, class D2>
|
| 375 |
constexpr bool operator==(const unique_ptr<T1, D1>& x, // freestanding
|
| 376 |
const unique_ptr<T2, D2>& y);
|
| 377 |
template<class T1, class D1, class T2, class D2>
|
| 378 |
-
bool operator<(const unique_ptr<T1, D1>& x,
|
|
|
|
| 379 |
template<class T1, class D1, class T2, class D2>
|
| 380 |
-
bool operator>(const unique_ptr<T1, D1>& x,
|
|
|
|
| 381 |
template<class T1, class D1, class T2, class D2>
|
| 382 |
-
bool operator<=(const unique_ptr<T1, D1>& x,
|
|
|
|
| 383 |
template<class T1, class D1, class T2, class D2>
|
| 384 |
-
bool operator>=(const unique_ptr<T1, D1>& x,
|
|
|
|
| 385 |
template<class T1, class D1, class T2, class D2>
|
| 386 |
requires three_way_comparable_with<typename unique_ptr<T1, D1>::pointer,
|
| 387 |
typename unique_ptr<T2, D2>::pointer>
|
| 388 |
-
compare_three_way_result_t<typename unique_ptr<T1, D1>::pointer,
|
| 389 |
typename unique_ptr<T2, D2>::pointer>
|
| 390 |
operator<=>(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y); // freestanding
|
| 391 |
|
| 392 |
template<class T, class D>
|
| 393 |
constexpr bool operator==(const unique_ptr<T, D>& x, nullptr_t) noexcept; // freestanding
|
|
@@ -421,95 +552,103 @@ namespace std {
|
|
| 421 |
// [util.smartptr.shared], class template shared_ptr
|
| 422 |
template<class T> class shared_ptr;
|
| 423 |
|
| 424 |
// [util.smartptr.shared.create], shared_ptr creation
|
| 425 |
template<class T, class... Args>
|
| 426 |
-
shared_ptr<T> make_shared(Args&&... args);
|
| 427 |
template<class T, class A, class... Args>
|
| 428 |
-
shared_ptr<T> allocate_shared(const A& a, Args&&... args);
|
| 429 |
|
| 430 |
template<class T>
|
| 431 |
-
shared_ptr<T> make_shared(size_t N);
|
| 432 |
template<class T, class A>
|
| 433 |
-
shared_ptr<T> allocate_shared(const A& a, size_t N);
|
| 434 |
|
| 435 |
template<class T>
|
| 436 |
-
shared_ptr<T> make_shared();
|
| 437 |
template<class T, class A>
|
| 438 |
-
shared_ptr<T> allocate_shared(const A& a);
|
| 439 |
|
| 440 |
template<class T>
|
| 441 |
-
shared_ptr<T> make_shared(size_t N, const remove_extent_t<T>& u);
|
| 442 |
template<class T, class A>
|
| 443 |
-
shared_ptr<T> allocate_shared(const A& a, size_t N,
|
| 444 |
const remove_extent_t<T>& u); // T is U[]
|
| 445 |
|
| 446 |
template<class T>
|
| 447 |
-
shared_ptr<T> make_shared(const remove_extent_t<T>& u);
|
| 448 |
template<class T, class A>
|
| 449 |
-
shared_ptr<T> allocate_shared(const A& a,
|
|
|
|
| 450 |
|
| 451 |
template<class T>
|
| 452 |
-
shared_ptr<T> make_shared_for_overwrite();
|
| 453 |
template<class T, class A>
|
| 454 |
-
shared_ptr<T> allocate_shared_for_overwrite(const A& a);
|
| 455 |
|
| 456 |
template<class T>
|
| 457 |
-
shared_ptr<T> make_shared_for_overwrite(size_t N);
|
| 458 |
template<class T, class A>
|
| 459 |
-
shared_ptr<T> allocate_shared_for_overwrite(const A& a, size_t N);
|
| 460 |
|
| 461 |
// [util.smartptr.shared.cmp], shared_ptr comparisons
|
| 462 |
template<class T, class U>
|
| 463 |
-
bool operator==(const shared_ptr<T>& a, const shared_ptr<U>& b) noexcept;
|
| 464 |
template<class T, class U>
|
| 465 |
-
strong_ordering operator<=>(const shared_ptr<T>& a,
|
|
|
|
| 466 |
|
| 467 |
template<class T>
|
| 468 |
-
bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept;
|
| 469 |
template<class T>
|
| 470 |
-
strong_ordering operator<=>(const shared_ptr<T>& x, nullptr_t) noexcept;
|
| 471 |
|
| 472 |
// [util.smartptr.shared.spec], shared_ptr specialized algorithms
|
| 473 |
template<class T>
|
| 474 |
-
void swap(shared_ptr<T>& a, shared_ptr<T>& b) noexcept;
|
| 475 |
|
| 476 |
// [util.smartptr.shared.cast], shared_ptr casts
|
| 477 |
template<class T, class U>
|
| 478 |
-
shared_ptr<T> static_pointer_cast(const shared_ptr<U>& r) noexcept;
|
| 479 |
template<class T, class U>
|
| 480 |
-
shared_ptr<T> static_pointer_cast(shared_ptr<U>&& r) noexcept;
|
| 481 |
template<class T, class U>
|
| 482 |
-
shared_ptr<T> dynamic_pointer_cast(const shared_ptr<U>& r) noexcept;
|
| 483 |
template<class T, class U>
|
| 484 |
-
shared_ptr<T> dynamic_pointer_cast(shared_ptr<U>&& r) noexcept;
|
| 485 |
template<class T, class U>
|
| 486 |
-
shared_ptr<T> const_pointer_cast(const shared_ptr<U>& r) noexcept;
|
| 487 |
template<class T, class U>
|
| 488 |
-
shared_ptr<T> const_pointer_cast(shared_ptr<U>&& r) noexcept;
|
| 489 |
template<class T, class U>
|
| 490 |
shared_ptr<T> reinterpret_pointer_cast(const shared_ptr<U>& r) noexcept;
|
| 491 |
template<class T, class U>
|
| 492 |
shared_ptr<T> reinterpret_pointer_cast(shared_ptr<U>&& r) noexcept;
|
| 493 |
|
| 494 |
// [util.smartptr.getdeleter], shared_ptr get_deleter
|
| 495 |
template<class D, class T>
|
| 496 |
-
D* get_deleter(const shared_ptr<T>& p) noexcept;
|
| 497 |
|
| 498 |
// [util.smartptr.shared.io], shared_ptr I/O
|
| 499 |
template<class E, class T, class Y>
|
| 500 |
basic_ostream<E, T>& operator<<(basic_ostream<E, T>& os, const shared_ptr<Y>& p);
|
| 501 |
|
| 502 |
// [util.smartptr.weak], class template weak_ptr
|
| 503 |
template<class T> class weak_ptr;
|
| 504 |
|
| 505 |
// [util.smartptr.weak.spec], weak_ptr specialized algorithms
|
| 506 |
-
template<class T> void swap(weak_ptr<T>& a, weak_ptr<T>& b) noexcept;
|
| 507 |
|
| 508 |
// [util.smartptr.ownerless], class template owner_less
|
| 509 |
template<class T = void> struct owner_less;
|
| 510 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 511 |
// [util.smartptr.enab], class template enable_shared_from_this
|
| 512 |
template<class T> class enable_shared_from_this;
|
| 513 |
|
| 514 |
// [util.smartptr.hash], hash support
|
| 515 |
template<class T> struct hash; // freestanding
|
|
@@ -521,21 +660,37 @@ namespace std {
|
|
| 521 |
template<class T> struct atomic<shared_ptr<T>>;
|
| 522 |
template<class T> struct atomic<weak_ptr<T>>;
|
| 523 |
|
| 524 |
// [out.ptr.t], class template out_ptr_t
|
| 525 |
template<class Smart, class Pointer, class... Args>
|
| 526 |
-
class out_ptr_t;
|
| 527 |
|
| 528 |
// [out.ptr], function template out_ptr
|
| 529 |
template<class Pointer = void, class Smart, class... Args>
|
| 530 |
-
auto out_ptr(Smart& s, Args&&... args);
|
| 531 |
|
| 532 |
// [inout.ptr.t], class template inout_ptr_t
|
| 533 |
template<class Smart, class Pointer, class... Args>
|
| 534 |
-
class inout_ptr_t;
|
| 535 |
|
| 536 |
// [inout.ptr], function template inout_ptr
|
| 537 |
template<class Pointer = void, class Smart, class... Args>
|
| 538 |
-
auto inout_ptr(Smart& s, Args&&... args);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 539 |
}
|
| 540 |
```
|
| 541 |
|
|
|
|
| 37 |
constexpr auto to_address(const Ptr& p) noexcept; // freestanding
|
| 38 |
|
| 39 |
// [ptr.align], pointer alignment
|
| 40 |
void* align(size_t alignment, size_t size, void*& ptr, size_t& space); // freestanding
|
| 41 |
template<size_t N, class T>
|
| 42 |
+
constexpr T* assume_aligned(T* ptr); // freestanding
|
| 43 |
+
template<size_t Alignment, class T>
|
| 44 |
+
bool is_sufficiently_aligned(T* ptr);
|
| 45 |
|
| 46 |
// [obj.lifetime], explicit lifetime management
|
| 47 |
template<class T>
|
| 48 |
T* start_lifetime_as(void* p) noexcept; // freestanding
|
| 49 |
template<class T>
|
|
|
|
| 59 |
template<class T>
|
| 60 |
volatile T* start_lifetime_as_array(volatile void* p, size_t n) noexcept; // freestanding
|
| 61 |
template<class T>
|
| 62 |
const volatile T* start_lifetime_as_array(const volatile void* p, // freestanding
|
| 63 |
size_t n) noexcept;
|
| 64 |
+
template<class T>
|
| 65 |
+
T* trivially_relocate(T* first, T* last, T* result); // freestanding
|
| 66 |
+
template<class T>
|
| 67 |
+
constexpr T* relocate(T* first, T* last, T* result); // freestanding
|
| 68 |
|
| 69 |
// [allocator.tag], allocator argument tag
|
| 70 |
+
struct allocator_arg_t { explicit allocator_arg_t() = default; }; // freestanding
|
|
|
|
|
|
|
| 71 |
inline constexpr allocator_arg_t allocator_arg{}; // freestanding
|
| 72 |
|
| 73 |
// [allocator.uses], uses_allocator
|
| 74 |
template<class T, class Alloc> struct uses_allocator; // freestanding
|
| 75 |
|
|
|
|
| 138 |
// [special.mem.concepts], special memory concepts
|
| 139 |
template<class I>
|
| 140 |
concept nothrow-input-iterator = see below; // exposition only
|
| 141 |
template<class I>
|
| 142 |
concept nothrow-forward-iterator = see below; // exposition only
|
| 143 |
+
template<class I>
|
| 144 |
+
concept nothrow-bidirectional-iterator = see below; // exposition only
|
| 145 |
+
template<class I>
|
| 146 |
+
concept nothrow-random-access-iterator = see below; // exposition only
|
| 147 |
template<class S, class I>
|
| 148 |
concept nothrow-sentinel-for = see below; // exposition only
|
| 149 |
+
template<class S, class I>
|
| 150 |
+
concept nothrow-sized-sentinel-for = see below; // exposition only
|
| 151 |
template<class R>
|
| 152 |
concept nothrow-input-range = see below; // exposition only
|
| 153 |
template<class R>
|
| 154 |
concept nothrow-forward-range = see below; // exposition only
|
| 155 |
+
template<class R>
|
| 156 |
+
concept nothrow-bidirectional-range = see below; // exposition only
|
| 157 |
+
template<class R>
|
| 158 |
+
concept nothrow-random-access-range = see below; // exposition only
|
| 159 |
+
template<class R>
|
| 160 |
+
concept nothrow-sized-random-access-range = see below; // exposition only
|
| 161 |
|
| 162 |
template<class NoThrowForwardIterator>
|
| 163 |
+
constexpr void uninitialized_default_construct(NoThrowForwardIterator first, // freestanding
|
| 164 |
NoThrowForwardIterator last);
|
| 165 |
template<class ExecutionPolicy, class NoThrowForwardIterator>
|
| 166 |
+
void uninitialized_default_construct(ExecutionPolicy&& exec, // freestanding-deleted,
|
| 167 |
+
NoThrowForwardIterator first, // see [algorithms.parallel.overloads]
|
| 168 |
NoThrowForwardIterator last);
|
| 169 |
template<class NoThrowForwardIterator, class Size>
|
| 170 |
+
constexpr NoThrowForwardIterator
|
| 171 |
uninitialized_default_construct_n(NoThrowForwardIterator first, Size n); // freestanding
|
| 172 |
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size>
|
| 173 |
NoThrowForwardIterator
|
| 174 |
+
uninitialized_default_construct_n(ExecutionPolicy&& exec, // freestanding-deleted,
|
| 175 |
+
NoThrowForwardIterator first, // see [algorithms.parallel.overloads]
|
| 176 |
+
Size n);
|
| 177 |
|
| 178 |
namespace ranges {
|
| 179 |
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
|
| 180 |
requires default_initializable<iter_value_t<I>>
|
| 181 |
+
constexpr I uninitialized_default_construct(I first, S last); // freestanding
|
| 182 |
template<nothrow-forward-range R>
|
| 183 |
requires default_initializable<range_value_t<R>>
|
| 184 |
+
constexpr borrowed_iterator_t<R> uninitialized_default_construct(R&& r); // freestanding
|
| 185 |
|
| 186 |
template<nothrow-forward-iterator I>
|
| 187 |
requires default_initializable<iter_value_t<I>>
|
| 188 |
+
constexpr I uninitialized_default_construct_n(I first, // freestanding
|
| 189 |
+
iter_difference_t<I> n);
|
| 190 |
+
|
| 191 |
+
template<execution-policy Ep, nothrow-random-access-iterator I,
|
| 192 |
+
nothrow-sized-sentinel-for<I> S>
|
| 193 |
+
requires default_initializable<iter_value_t<I>>
|
| 194 |
+
I uninitialized_default_construct(Ep&& exec, I first, S last); // freestanding-deleted,
|
| 195 |
+
// see [algorithms.parallel.overloads]
|
| 196 |
+
template<execution-policy Ep, nothrow-sized-random-access-range R>
|
| 197 |
+
requires default_initializable<range_value_t<R>>
|
| 198 |
+
borrowed_iterator_t<R> uninitialized_default_construct(Ep&& exec, // freestanding-deleted,
|
| 199 |
+
R&& r); // see [algorithms.parallel.overloads]
|
| 200 |
+
|
| 201 |
+
template<execution-policy Ep, nothrow-random-access-iterator I>
|
| 202 |
+
requires default_initializable<iter_value_t<I>>
|
| 203 |
+
I uninitialized_default_construct_n(Ep&& exec, I first, // freestanding-deleted,
|
| 204 |
+
iter_difference_t<I> n); // see [algorithms.parallel.overloads]
|
| 205 |
}
|
| 206 |
|
| 207 |
template<class NoThrowForwardIterator>
|
| 208 |
+
constexpr void uninitialized_value_construct(NoThrowForwardIterator first, // freestanding
|
| 209 |
NoThrowForwardIterator last);
|
| 210 |
template<class ExecutionPolicy, class NoThrowForwardIterator>
|
| 211 |
+
void uninitialized_value_construct(ExecutionPolicy&& exec, // freestanding-deleted,
|
| 212 |
+
NoThrowForwardIterator first, // see [algorithms.parallel.overloads]
|
| 213 |
NoThrowForwardIterator last);
|
| 214 |
template<class NoThrowForwardIterator, class Size>
|
| 215 |
+
constexpr NoThrowForwardIterator
|
| 216 |
uninitialized_value_construct_n(NoThrowForwardIterator first, Size n); // freestanding
|
| 217 |
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size>
|
| 218 |
NoThrowForwardIterator
|
| 219 |
+
uninitialized_value_construct_n(ExecutionPolicy&& exec, // freestanding-deleted,
|
| 220 |
+
NoThrowForwardIterator first, // see [algorithms.parallel.overloads]
|
| 221 |
+
Size n);
|
| 222 |
|
| 223 |
namespace ranges {
|
| 224 |
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
|
| 225 |
requires default_initializable<iter_value_t<I>>
|
| 226 |
+
constexpr I uninitialized_value_construct(I first, S last); // freestanding
|
| 227 |
template<nothrow-forward-range R>
|
| 228 |
requires default_initializable<range_value_t<R>>
|
| 229 |
+
constexpr borrowed_iterator_t<R> uninitialized_value_construct(R&& r); // freestanding
|
| 230 |
|
| 231 |
template<nothrow-forward-iterator I>
|
| 232 |
requires default_initializable<iter_value_t<I>>
|
| 233 |
+
constexpr I uninitialized_value_construct_n(I first, // freestanding
|
| 234 |
+
iter_difference_t<I> n);
|
| 235 |
+
|
| 236 |
+
template<execution-policy Ep, nothrow-random-access-iterator I,
|
| 237 |
+
nothrow-sized-sentinel-for<I> S>
|
| 238 |
+
requires default_initializable<iter_value_t<I>>
|
| 239 |
+
I uninitialized_value_construct(Ep&& exec, I first, S last); // freestanding-deleted,
|
| 240 |
+
// see [algorithms.parallel.overloads]
|
| 241 |
+
template<execution-policy Ep, nothrow-sized-random-access-range R>
|
| 242 |
+
requires default_initializable<range_value_t<R>>
|
| 243 |
+
borrowed_iterator_t<R> uninitialized_value_construct(Ep&& exec, // freestanding-deleted,
|
| 244 |
+
R&& r); // see [algorithms.parallel.overloads]
|
| 245 |
+
|
| 246 |
+
template<execution-policy Ep, nothrow-random-access-iterator I>
|
| 247 |
+
requires default_initializable<iter_value_t<I>>
|
| 248 |
+
I uninitialized_value_construct_n(Ep&& exec, I first, // freestanding-deleted,
|
| 249 |
+
iter_difference_t<I> n); // see [algorithms.parallel.overloads]
|
| 250 |
}
|
| 251 |
|
| 252 |
template<class InputIterator, class NoThrowForwardIterator>
|
| 253 |
+
constexpr NoThrowForwardIterator uninitialized_copy(InputIterator first, // freestanding
|
| 254 |
InputIterator last,
|
| 255 |
NoThrowForwardIterator result);
|
| 256 |
template<class ExecutionPolicy, class ForwardIterator, class NoThrowForwardIterator>
|
| 257 |
+
NoThrowForwardIterator uninitialized_copy(ExecutionPolicy&& exec, // freestanding-deleted,
|
| 258 |
+
ForwardIterator first, // see [algorithms.parallel.overloads]
|
| 259 |
+
ForwardIterator last,
|
| 260 |
NoThrowForwardIterator result);
|
| 261 |
template<class InputIterator, class Size, class NoThrowForwardIterator>
|
| 262 |
+
constexpr NoThrowForwardIterator uninitialized_copy_n(InputIterator first, // freestanding
|
| 263 |
+
Size n,
|
| 264 |
NoThrowForwardIterator result);
|
| 265 |
template<class ExecutionPolicy, class ForwardIterator, class Size,
|
| 266 |
class NoThrowForwardIterator>
|
| 267 |
+
NoThrowForwardIterator uninitialized_copy_n(ExecutionPolicy&& exec, // freestanding-deleted,
|
| 268 |
+
ForwardIterator first, // see [algorithms.parallel.overloads]
|
| 269 |
+
Size n,
|
| 270 |
NoThrowForwardIterator result);
|
| 271 |
|
| 272 |
namespace ranges {
|
| 273 |
template<class I, class O>
|
| 274 |
using uninitialized_copy_result = in_out_result<I, O>; // freestanding
|
| 275 |
template<input_iterator I, sentinel_for<I> S1,
|
| 276 |
nothrow-forward-iterator O, nothrow-sentinel-for<O> S2>
|
| 277 |
requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
|
| 278 |
+
constexpr uninitialized_copy_result<I, O>
|
| 279 |
uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); // freestanding
|
| 280 |
template<input_range IR, nothrow-forward-range OR>
|
| 281 |
requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
|
| 282 |
+
constexpr uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
|
| 283 |
uninitialized_copy(IR&& in_range, OR&& out_range); // freestanding
|
| 284 |
|
| 285 |
template<class I, class O>
|
| 286 |
using uninitialized_copy_n_result = in_out_result<I, O>; // freestanding
|
| 287 |
template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
|
| 288 |
requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
|
| 289 |
+
constexpr uninitialized_copy_n_result<I, O>
|
| 290 |
uninitialized_copy_n(I ifirst, iter_difference_t<I> n, // freestanding
|
| 291 |
O ofirst, S olast);
|
| 292 |
+
|
| 293 |
+
template<execution-policy Ep, random_access_iterator I, sized_sentinel_for<I> S1,
|
| 294 |
+
nothrow-random-access-iterator O, nothrow-sized-sentinel-for<O> S2>
|
| 295 |
+
requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
|
| 296 |
+
uninitialized_copy_result<I, O>
|
| 297 |
+
uninitialized_copy(Ep&& exec, I ifirst, S1 ilast, // freestanding-deleted,
|
| 298 |
+
O ofirst, S2 olast); // see [algorithms.parallel.overloads]
|
| 299 |
+
template<execution-policy Ep, sized-random-access-range IR,
|
| 300 |
+
nothrow-sized-random-access-range OR>
|
| 301 |
+
requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
|
| 302 |
+
uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
|
| 303 |
+
uninitialized_copy(Ep&& exec, IR&& in_range, OR&& out_range); // freestanding-deleted,
|
| 304 |
+
// see [algorithms.parallel.overloads]
|
| 305 |
+
template<execution-policy Ep, random_access_iterator I, nothrow-random-access-iterator O,
|
| 306 |
+
nothrow-sized-sentinel-for<O> S>
|
| 307 |
+
requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
|
| 308 |
+
uninitialized_copy_n_result<I, O>
|
| 309 |
+
uninitialized_copy_n(Ep&& exec, I ifirst, iter_difference_t<I> n, // freestanding-deleted,
|
| 310 |
+
O ofirst, S olast); // see [algorithms.parallel.overloads]
|
| 311 |
}
|
| 312 |
|
| 313 |
template<class InputIterator, class NoThrowForwardIterator>
|
| 314 |
+
constexpr NoThrowForwardIterator uninitialized_move(InputIterator first, // freestanding
|
| 315 |
InputIterator last,
|
| 316 |
NoThrowForwardIterator result);
|
| 317 |
template<class ExecutionPolicy, class ForwardIterator, class NoThrowForwardIterator>
|
| 318 |
+
NoThrowForwardIterator uninitialized_move(ExecutionPolicy&& exec, // freestanding-deleted,
|
| 319 |
+
ForwardIterator first, // see [algorithms.parallel.overloads]
|
| 320 |
+
ForwardIterator last,
|
| 321 |
NoThrowForwardIterator result);
|
| 322 |
template<class InputIterator, class Size, class NoThrowForwardIterator>
|
| 323 |
+
constexpr pair<InputIterator, NoThrowForwardIterator>
|
| 324 |
uninitialized_move_n(InputIterator first, Size n, // freestanding
|
| 325 |
NoThrowForwardIterator result);
|
| 326 |
template<class ExecutionPolicy, class ForwardIterator, class Size,
|
| 327 |
class NoThrowForwardIterator>
|
| 328 |
pair<ForwardIterator, NoThrowForwardIterator>
|
| 329 |
+
uninitialized_move_n(ExecutionPolicy&& exec, // freestanding-deleted,
|
| 330 |
+
ForwardIterator first, Size n, // see [algorithms.parallel.overloads]
|
| 331 |
+
NoThrowForwardIterator result);
|
| 332 |
|
| 333 |
namespace ranges {
|
| 334 |
template<class I, class O>
|
| 335 |
using uninitialized_move_result = in_out_result<I, O>; // freestanding
|
| 336 |
template<input_iterator I, sentinel_for<I> S1,
|
| 337 |
nothrow-forward-iterator O, nothrow-sentinel-for<O> S2>
|
| 338 |
requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
|
| 339 |
+
constexpr uninitialized_move_result<I, O>
|
| 340 |
uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); // freestanding
|
| 341 |
template<input_range IR, nothrow-forward-range OR>
|
| 342 |
requires constructible_from<range_value_t<OR>, range_rvalue_reference_t<IR>>
|
| 343 |
+
constexpr uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
|
| 344 |
uninitialized_move(IR&& in_range, OR&& out_range); // freestanding
|
| 345 |
|
| 346 |
template<class I, class O>
|
| 347 |
using uninitialized_move_n_result = in_out_result<I, O>; // freestanding
|
| 348 |
template<input_iterator I,
|
| 349 |
nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
|
| 350 |
requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
|
| 351 |
+
constexpr uninitialized_move_n_result<I, O>
|
| 352 |
uninitialized_move_n(I ifirst, iter_difference_t<I> n, // freestanding
|
| 353 |
O ofirst, S olast);
|
| 354 |
+
|
| 355 |
+
template<execution-policy Ep, random_access_iterator I, sized_sentinel_for<I> S1,
|
| 356 |
+
nothrow-random-access-iterator O, nothrow-sized-sentinel-for<O> S2>
|
| 357 |
+
requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
|
| 358 |
+
uninitialized_move_result<I, O>
|
| 359 |
+
uninitialized_move(Ep&& exec, I ifirst, S1 ilast, // freestanding-deleted,
|
| 360 |
+
O ofirst, S2 olast); // see [algorithms.parallel.overloads]
|
| 361 |
+
template<execution-policy Ep, sized-random-access-range IR,
|
| 362 |
+
nothrow-sized-random-access-range OR>
|
| 363 |
+
requires constructible_from<range_value_t<OR>, range_rvalue_reference_t<IR>>
|
| 364 |
+
uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
|
| 365 |
+
uninitialized_move(Ep&& exec, IR&& in_range, OR&& out_range); // freestanding-deleted,
|
| 366 |
+
// see [algorithms.parallel.overloads]
|
| 367 |
+
|
| 368 |
+
template<execution-policy Ep, random_access_iterator I,
|
| 369 |
+
nothrow-random-access-iterator O, nothrow-sized-sentinel-for<O> S>
|
| 370 |
+
requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
|
| 371 |
+
uninitialized_move_n_result<I, O>
|
| 372 |
+
uninitialized_move_n(Ep&& exec, I ifirst, iter_difference_t<I> n, // freestanding-deleted,
|
| 373 |
+
O ofirst, S olast); // see [algorithms.parallel.overloads]
|
| 374 |
}
|
| 375 |
|
| 376 |
template<class NoThrowForwardIterator, class T>
|
| 377 |
+
constexpr void uninitialized_fill(NoThrowForwardIterator first, // freestanding
|
| 378 |
NoThrowForwardIterator last, const T& x);
|
| 379 |
template<class ExecutionPolicy, class NoThrowForwardIterator, class T>
|
| 380 |
+
void uninitialized_fill(ExecutionPolicy&& exec, // freestanding-deleted,
|
| 381 |
+
NoThrowForwardIterator first, // see [algorithms.parallel.overloads]
|
| 382 |
+
NoThrowForwardIterator last,
|
| 383 |
const T& x);
|
| 384 |
template<class NoThrowForwardIterator, class Size, class T>
|
| 385 |
+
constexpr NoThrowForwardIterator
|
| 386 |
uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x); // freestanding
|
| 387 |
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size, class T>
|
| 388 |
NoThrowForwardIterator
|
| 389 |
+
uninitialized_fill_n(ExecutionPolicy&& exec, // freestanding-deleted,
|
| 390 |
+
NoThrowForwardIterator first, // see [algorithms.parallel.overloads]
|
| 391 |
+
Size n, const T& x);
|
| 392 |
|
| 393 |
namespace ranges {
|
| 394 |
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S, class T>
|
| 395 |
requires constructible_from<iter_value_t<I>, const T&>
|
| 396 |
+
constexpr I uninitialized_fill(I first, S last, const T& x); // freestanding
|
| 397 |
template<nothrow-forward-range R, class T>
|
| 398 |
requires constructible_from<range_value_t<R>, const T&>
|
| 399 |
+
constexpr borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x); // freestanding
|
| 400 |
|
| 401 |
template<nothrow-forward-iterator I, class T>
|
| 402 |
requires constructible_from<iter_value_t<I>, const T&>
|
| 403 |
+
constexpr I uninitialized_fill_n(I first, // freestanding
|
| 404 |
+
iter_difference_t<I> n, const T& x);
|
| 405 |
+
|
| 406 |
+
template<execution-policy Ep, nothrow-random-access-iterator I,
|
| 407 |
+
nothrow-sized-sentinel-for<I> S, class T>
|
| 408 |
+
requires constructible_from<iter_value_t<I>, const T&>
|
| 409 |
+
I uninitialized_fill(Ep&& exec, I first, S last, const T& x); // freestanding-deleted,
|
| 410 |
+
// see [algorithms.parallel.overloads]
|
| 411 |
+
template<execution-policy Ep, nothrow-sized-random-access-range R, class T>
|
| 412 |
+
requires constructible_from<range_value_t<R>, const T&>
|
| 413 |
+
borrowed_iterator_t<R> uninitialized_fill(Ep&& exec, R&& r, // freestanding-deleted,
|
| 414 |
+
const T& x); // see [algorithms.parallel.overloads]
|
| 415 |
+
|
| 416 |
+
template<execution-policy Ep, nothrow-random-access-iterator I, class T>
|
| 417 |
+
requires constructible_from<iter_value_t<I>, const T&>
|
| 418 |
+
I uninitialized_fill_n(Ep&& exec, I first, // freestanding-deleted,
|
| 419 |
+
iter_difference_t<I> n, const T& x); // see [algorithms.parallel.overloads]
|
| 420 |
}
|
| 421 |
|
| 422 |
// [specialized.construct], construct_at
|
| 423 |
template<class T, class... Args>
|
| 424 |
constexpr T* construct_at(T* location, Args&&... args); // freestanding
|
|
|
|
| 433 |
constexpr void destroy_at(T* location); // freestanding
|
| 434 |
template<class NoThrowForwardIterator>
|
| 435 |
constexpr void destroy(NoThrowForwardIterator first, // freestanding
|
| 436 |
NoThrowForwardIterator last);
|
| 437 |
template<class ExecutionPolicy, class NoThrowForwardIterator>
|
| 438 |
+
void destroy(ExecutionPolicy&& exec, // freestanding-deleted,
|
| 439 |
+
NoThrowForwardIterator first, // see [algorithms.parallel.overloads]
|
| 440 |
+
NoThrowForwardIterator last);
|
| 441 |
template<class NoThrowForwardIterator, class Size>
|
| 442 |
constexpr NoThrowForwardIterator destroy_n(NoThrowForwardIterator first, // freestanding
|
| 443 |
Size n);
|
| 444 |
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size>
|
| 445 |
+
NoThrowForwardIterator destroy_n(ExecutionPolicy&& exec, // freestanding-deleted,
|
| 446 |
+
NoThrowForwardIterator first, Size n); // see [algorithms.parallel.overloads]
|
| 447 |
|
| 448 |
namespace ranges {
|
| 449 |
template<destructible T>
|
| 450 |
constexpr void destroy_at(T* location) noexcept; // freestanding
|
| 451 |
|
|
|
|
| 457 |
constexpr borrowed_iterator_t<R> destroy(R&& r) noexcept; // freestanding
|
| 458 |
|
| 459 |
template<nothrow-input-iterator I>
|
| 460 |
requires destructible<iter_value_t<I>>
|
| 461 |
constexpr I destroy_n(I first, iter_difference_t<I> n) noexcept; // freestanding
|
| 462 |
+
|
| 463 |
+
template<execution-policy Ep, nothrow-random-access-iterator I,
|
| 464 |
+
nothrow-sized-sentinel-for<I> S>
|
| 465 |
+
requires destructible<iter_value_t<I>>
|
| 466 |
+
I destroy(Ep&& exec, I first, S last) noexcept; // freestanding-deleted,
|
| 467 |
+
// see [algorithms.parallel.overloads]
|
| 468 |
+
template<execution-policy Ep, nothrow-sized-random-access-range R>
|
| 469 |
+
requires destructible<range_value_t<R>>
|
| 470 |
+
borrowed_iterator_t<R> destroy(Ep&& exec, R&& r) noexcept; // freestanding-deleted,
|
| 471 |
+
// see [algorithms.parallel.overloads]
|
| 472 |
+
template<execution-policy Ep, nothrow-random-access-iterator I>
|
| 473 |
+
requires destructible<iter_value_t<I>>
|
| 474 |
+
I destroy_n(Ep&& exec, I first, iter_difference_t<I> n) noexcept; // freestanding-deleted,
|
| 475 |
+
// see [algorithms.parallel.overloads]
|
| 476 |
}
|
| 477 |
|
| 478 |
// [unique.ptr], class template unique_ptr
|
| 479 |
template<class T> struct default_delete; // freestanding
|
| 480 |
template<class T> struct default_delete<T[]>; // freestanding
|
|
|
|
| 500 |
|
| 501 |
template<class T1, class D1, class T2, class D2>
|
| 502 |
constexpr bool operator==(const unique_ptr<T1, D1>& x, // freestanding
|
| 503 |
const unique_ptr<T2, D2>& y);
|
| 504 |
template<class T1, class D1, class T2, class D2>
|
| 505 |
+
constexpr bool operator<(const unique_ptr<T1, D1>& x, // freestanding
|
| 506 |
+
const unique_ptr<T2, D2>& y);
|
| 507 |
template<class T1, class D1, class T2, class D2>
|
| 508 |
+
constexpr bool operator>(const unique_ptr<T1, D1>& x, // freestanding
|
| 509 |
+
const unique_ptr<T2, D2>& y);
|
| 510 |
template<class T1, class D1, class T2, class D2>
|
| 511 |
+
constexpr bool operator<=(const unique_ptr<T1, D1>& x, // freestanding
|
| 512 |
+
const unique_ptr<T2, D2>& y);
|
| 513 |
template<class T1, class D1, class T2, class D2>
|
| 514 |
+
constexpr bool operator>=(const unique_ptr<T1, D1>& x, // freestanding
|
| 515 |
+
const unique_ptr<T2, D2>& y);
|
| 516 |
template<class T1, class D1, class T2, class D2>
|
| 517 |
requires three_way_comparable_with<typename unique_ptr<T1, D1>::pointer,
|
| 518 |
typename unique_ptr<T2, D2>::pointer>
|
| 519 |
+
constexpr compare_three_way_result_t<typename unique_ptr<T1, D1>::pointer,
|
| 520 |
typename unique_ptr<T2, D2>::pointer>
|
| 521 |
operator<=>(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y); // freestanding
|
| 522 |
|
| 523 |
template<class T, class D>
|
| 524 |
constexpr bool operator==(const unique_ptr<T, D>& x, nullptr_t) noexcept; // freestanding
|
|
|
|
| 552 |
// [util.smartptr.shared], class template shared_ptr
|
| 553 |
template<class T> class shared_ptr;
|
| 554 |
|
| 555 |
// [util.smartptr.shared.create], shared_ptr creation
|
| 556 |
template<class T, class... Args>
|
| 557 |
+
constexpr shared_ptr<T> make_shared(Args&&... args); // T is not array
|
| 558 |
template<class T, class A, class... Args>
|
| 559 |
+
constexpr shared_ptr<T> allocate_shared(const A& a, Args&&... args); // T is not array
|
| 560 |
|
| 561 |
template<class T>
|
| 562 |
+
constexpr shared_ptr<T> make_shared(size_t N); // T is U[]
|
| 563 |
template<class T, class A>
|
| 564 |
+
constexpr shared_ptr<T> allocate_shared(const A& a, size_t N); // T is U[]
|
| 565 |
|
| 566 |
template<class T>
|
| 567 |
+
constexpr shared_ptr<T> make_shared(); // T is U[N]
|
| 568 |
template<class T, class A>
|
| 569 |
+
constexpr shared_ptr<T> allocate_shared(const A& a); // T is U[N]
|
| 570 |
|
| 571 |
template<class T>
|
| 572 |
+
constexpr shared_ptr<T> make_shared(size_t N, const remove_extent_t<T>& u); // T is U[]
|
| 573 |
template<class T, class A>
|
| 574 |
+
constexpr shared_ptr<T> allocate_shared(const A& a, size_t N,
|
| 575 |
const remove_extent_t<T>& u); // T is U[]
|
| 576 |
|
| 577 |
template<class T>
|
| 578 |
+
constexpr shared_ptr<T> make_shared(const remove_extent_t<T>& u); // T is U[N]
|
| 579 |
template<class T, class A>
|
| 580 |
+
constexpr shared_ptr<T> allocate_shared(const A& a, // T is U[N]
|
| 581 |
+
const remove_extent_t<T>& u);
|
| 582 |
|
| 583 |
template<class T>
|
| 584 |
+
constexpr shared_ptr<T> make_shared_for_overwrite(); // T is not U[]
|
| 585 |
template<class T, class A>
|
| 586 |
+
constexpr shared_ptr<T> allocate_shared_for_overwrite(const A& a); // T is not U[]
|
| 587 |
|
| 588 |
template<class T>
|
| 589 |
+
constexpr shared_ptr<T> make_shared_for_overwrite(size_t N); // T is U[]
|
| 590 |
template<class T, class A>
|
| 591 |
+
constexpr shared_ptr<T> allocate_shared_for_overwrite(const A& a, size_t N); // T is U[]
|
| 592 |
|
| 593 |
// [util.smartptr.shared.cmp], shared_ptr comparisons
|
| 594 |
template<class T, class U>
|
| 595 |
+
constexpr bool operator==(const shared_ptr<T>& a, const shared_ptr<U>& b) noexcept;
|
| 596 |
template<class T, class U>
|
| 597 |
+
constexpr strong_ordering operator<=>(const shared_ptr<T>& a,
|
| 598 |
+
const shared_ptr<U>& b) noexcept;
|
| 599 |
|
| 600 |
template<class T>
|
| 601 |
+
constexpr bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept;
|
| 602 |
template<class T>
|
| 603 |
+
constexpr strong_ordering operator<=>(const shared_ptr<T>& x, nullptr_t) noexcept;
|
| 604 |
|
| 605 |
// [util.smartptr.shared.spec], shared_ptr specialized algorithms
|
| 606 |
template<class T>
|
| 607 |
+
constexpr void swap(shared_ptr<T>& a, shared_ptr<T>& b) noexcept;
|
| 608 |
|
| 609 |
// [util.smartptr.shared.cast], shared_ptr casts
|
| 610 |
template<class T, class U>
|
| 611 |
+
constexpr shared_ptr<T> static_pointer_cast(const shared_ptr<U>& r) noexcept;
|
| 612 |
template<class T, class U>
|
| 613 |
+
constexpr shared_ptr<T> static_pointer_cast(shared_ptr<U>&& r) noexcept;
|
| 614 |
template<class T, class U>
|
| 615 |
+
constexpr shared_ptr<T> dynamic_pointer_cast(const shared_ptr<U>& r) noexcept;
|
| 616 |
template<class T, class U>
|
| 617 |
+
constexpr shared_ptr<T> dynamic_pointer_cast(shared_ptr<U>&& r) noexcept;
|
| 618 |
template<class T, class U>
|
| 619 |
+
constexpr shared_ptr<T> const_pointer_cast(const shared_ptr<U>& r) noexcept;
|
| 620 |
template<class T, class U>
|
| 621 |
+
constexpr shared_ptr<T> const_pointer_cast(shared_ptr<U>&& r) noexcept;
|
| 622 |
template<class T, class U>
|
| 623 |
shared_ptr<T> reinterpret_pointer_cast(const shared_ptr<U>& r) noexcept;
|
| 624 |
template<class T, class U>
|
| 625 |
shared_ptr<T> reinterpret_pointer_cast(shared_ptr<U>&& r) noexcept;
|
| 626 |
|
| 627 |
// [util.smartptr.getdeleter], shared_ptr get_deleter
|
| 628 |
template<class D, class T>
|
| 629 |
+
constexpr D* get_deleter(const shared_ptr<T>& p) noexcept;
|
| 630 |
|
| 631 |
// [util.smartptr.shared.io], shared_ptr I/O
|
| 632 |
template<class E, class T, class Y>
|
| 633 |
basic_ostream<E, T>& operator<<(basic_ostream<E, T>& os, const shared_ptr<Y>& p);
|
| 634 |
|
| 635 |
// [util.smartptr.weak], class template weak_ptr
|
| 636 |
template<class T> class weak_ptr;
|
| 637 |
|
| 638 |
// [util.smartptr.weak.spec], weak_ptr specialized algorithms
|
| 639 |
+
template<class T> constexpr void swap(weak_ptr<T>& a, weak_ptr<T>& b) noexcept;
|
| 640 |
|
| 641 |
// [util.smartptr.ownerless], class template owner_less
|
| 642 |
template<class T = void> struct owner_less;
|
| 643 |
|
| 644 |
+
// [util.smartptr.owner.hash], struct owner_hash
|
| 645 |
+
struct owner_hash;
|
| 646 |
+
|
| 647 |
+
// [util.smartptr.owner.equal], struct owner_equal
|
| 648 |
+
struct owner_equal;
|
| 649 |
+
|
| 650 |
// [util.smartptr.enab], class template enable_shared_from_this
|
| 651 |
template<class T> class enable_shared_from_this;
|
| 652 |
|
| 653 |
// [util.smartptr.hash], hash support
|
| 654 |
template<class T> struct hash; // freestanding
|
|
|
|
| 660 |
template<class T> struct atomic<shared_ptr<T>>;
|
| 661 |
template<class T> struct atomic<weak_ptr<T>>;
|
| 662 |
|
| 663 |
// [out.ptr.t], class template out_ptr_t
|
| 664 |
template<class Smart, class Pointer, class... Args>
|
| 665 |
+
class out_ptr_t; // freestanding
|
| 666 |
|
| 667 |
// [out.ptr], function template out_ptr
|
| 668 |
template<class Pointer = void, class Smart, class... Args>
|
| 669 |
+
constexpr auto out_ptr(Smart& s, Args&&... args); // freestanding
|
| 670 |
|
| 671 |
// [inout.ptr.t], class template inout_ptr_t
|
| 672 |
template<class Smart, class Pointer, class... Args>
|
| 673 |
+
class inout_ptr_t; // freestanding
|
| 674 |
|
| 675 |
// [inout.ptr], function template inout_ptr
|
| 676 |
template<class Pointer = void, class Smart, class... Args>
|
| 677 |
+
constexpr auto inout_ptr(Smart& s, Args&&... args); // freestanding
|
| 678 |
+
|
| 679 |
+
// [indirect], class template indirect
|
| 680 |
+
template<class T, class Allocator = allocator<T>>
|
| 681 |
+
class indirect;
|
| 682 |
+
|
| 683 |
+
// [indirect.hash], hash support
|
| 684 |
+
template<class T, class Alloc> struct hash<indirect<T, Alloc>>;
|
| 685 |
+
|
| 686 |
+
// [polymorphic], class template polymorphic
|
| 687 |
+
template<class T, class Allocator = allocator<T>>
|
| 688 |
+
class polymorphic;
|
| 689 |
+
|
| 690 |
+
namespace pmr {
|
| 691 |
+
template<class T> using indirect = indirect<T, polymorphic_allocator<T>>;
|
| 692 |
+
template<class T> using polymorphic = polymorphic<T, polymorphic_allocator<T>>;
|
| 693 |
+
}
|
| 694 |
}
|
| 695 |
```
|
| 696 |
|