|
33 | 33 | \begin{codeblock} |
34 | 34 | #include <compare> // see \ref{compare.syn} |
35 | 35 | #include <concepts> // see \ref{concepts.syn} |
| 36 | +#include <initializer_list> // see \ref{initializer.list.syn} |
36 | 37 |
|
37 | 38 | namespace std { |
38 | 39 | template<class T> using @\exposid{with-reference}@ = T&; // \expos |
|
464 | 465 | class ostreambuf_iterator; |
465 | 466 |
|
466 | 467 | // \ref{iterator.range}, range access |
467 | | - template<class C> constexpr auto begin(C& c) -> decltype(c.begin()); // freestanding |
468 | | - template<class C> constexpr auto begin(const C& c) -> decltype(c.begin()); // freestanding |
469 | | - template<class C> constexpr auto end(C& c) -> decltype(c.end()); // freestanding |
470 | | - template<class C> constexpr auto end(const C& c) -> decltype(c.end()); // freestanding |
| 468 | + template<class C> constexpr auto |
| 469 | + begin(C& c) noexcept(noexcept(c.begin())) -> decltype(c.begin()); // freestanding |
| 470 | + template<class C> constexpr auto |
| 471 | + begin(const C& c) noexcept(noexcept(c.begin())) -> decltype(c.begin()); // freestanding |
| 472 | + template<class C> constexpr auto |
| 473 | + end(C& c) noexcept(noexcept(c.end())) -> decltype(c.end()); // freestanding |
| 474 | + template<class C> constexpr auto |
| 475 | + end(const C& c) noexcept(noexcept(c.end())) -> decltype(c.end()); // freestanding |
471 | 476 | template<class T, size_t N> constexpr T* begin(T (&array)[N]) noexcept; // freestanding |
472 | 477 | template<class T, size_t N> constexpr T* end(T (&array)[N]) noexcept; // freestanding |
473 | | - template<class C> constexpr auto cbegin(const C& c) // freestanding |
474 | | - noexcept(noexcept(std::begin(c))) -> decltype(std::begin(c)); |
475 | | - template<class C> constexpr auto cend(const C& c) // freestanding |
476 | | - noexcept(noexcept(std::end(c))) -> decltype(std::end(c)); |
477 | | - template<class C> constexpr auto rbegin(C& c) -> decltype(c.rbegin()); // freestanding |
478 | | - template<class C> constexpr auto rbegin(const C& c) -> decltype(c.rbegin()); // freestanding |
479 | | - template<class C> constexpr auto rend(C& c) -> decltype(c.rend()); // freestanding |
480 | | - template<class C> constexpr auto rend(const C& c) -> decltype(c.rend()); // freestanding |
481 | | - template<class T, size_t N> constexpr reverse_iterator<T*> rbegin(T (&array)[N]) // freestanding |
482 | | - template<class T, size_t N> constexpr reverse_iterator<T*> rend(T (&array)[N]); // freestanding |
| 478 | + template<class C> constexpr auto |
| 479 | + cbegin(const C& c) noexcept(noexcept(std::begin(c))) |
| 480 | + -> decltype(std::begin(c)); // freestanding |
| 481 | + template<class C> constexpr auto |
| 482 | + cend(const C& c) noexcept(noexcept(std::end(c))) -> decltype(std::end(c)); // freestanding |
| 483 | + template<class C> constexpr auto |
| 484 | + rbegin(C& c) noexcept(noexcept(c.rbegin())) -> decltype(c.rbegin()); // freestanding |
| 485 | + template<class C> constexpr auto |
| 486 | + rbegin(const C& c) noexcept(noexcept(c.rbegin())) -> decltype(c.rbegin()); // freestanding |
| 487 | + template<class C> constexpr auto |
| 488 | + rend(C& c) noexcept(noexcept(c.rend())) -> decltype(c.rend()); // freestanding |
| 489 | + template<class C> constexpr auto |
| 490 | + rend(const C& c) noexcept(noexcept(c.rend())) -> decltype(c.rend()); // freestanding |
| 491 | + template<class T, size_t N> constexpr reverse_iterator<T*> |
| 492 | + rbegin(T (&array)[N]) noexcept; // freestanding |
| 493 | + template<class T, size_t N> constexpr reverse_iterator<T*> |
| 494 | + rend(T (&array)[N]) noexcept; // freestanding |
483 | 495 | template<class E> constexpr reverse_iterator<const E*> |
484 | | - rbegin(initializer_list<E> il); // freestanding |
| 496 | + rbegin(initializer_list<E> il) noexcept; // freestanding |
485 | 497 | template<class E> constexpr reverse_iterator<const E*> |
486 | | - rend(initializer_list<E> il); // freestanding |
| 498 | + rend(initializer_list<E> il) noexcept; // freestanding |
487 | 499 | template<class C> constexpr auto |
488 | | - crbegin(const C& c) -> decltype(std::rbegin(c)); // freestanding |
| 500 | + crbegin(const C& c) noexcept(noexcept(std::rbegin(c))) |
| 501 | + -> decltype(std::rbegin(c)); // freestanding |
489 | 502 | template<class C> constexpr auto |
490 | | - crend(const C& c) -> decltype(std::rend(c)); // freestanding |
| 503 | + crend(const C& c) noexcept(noexcept(std::rend(c))) -> decltype(std::rend(c)); // freestanding |
491 | 504 |
|
492 | 505 | template<class C> constexpr auto |
493 | | - size(const C& c) -> decltype(c.size()); // freestanding |
| 506 | + size(const C& c) noexcept(noexcept(c.size())) -> decltype(c.size()); // freestanding |
494 | 507 | template<class T, size_t N> constexpr size_t |
495 | 508 | size(const T (&array)[N]) noexcept; // freestanding |
496 | 509 |
|
497 | 510 | template<class C> constexpr auto |
498 | | - ssize(const C& c) |
| 511 | + ssize(const C& c) noexcept(noexcept(c.size())) |
499 | 512 | -> common_type_t<ptrdiff_t, make_signed_t<decltype(c.size())>>; // freestanding |
500 | 513 | template<class T, ptrdiff_t N> constexpr ptrdiff_t |
501 | 514 | ssize(const T (&array)[N]) noexcept; // freestanding |
502 | 515 |
|
503 | 516 | template<class C> constexpr auto |
504 | | - empty(const C& c) -> decltype(c.empty()); // freestanding |
| 517 | + empty(const C& c) noexcept(noexcept(c.empty())) -> decltype(c.empty()); // freestanding |
505 | 518 | template<class T, size_t N> constexpr bool |
506 | 519 | empty(const T (&array)[N]) noexcept; // freestanding |
507 | | - template<class E> constexpr bool |
508 | | - empty(initializer_list<E> il) noexcept; // freestanding |
509 | 520 |
|
510 | | - template<class C> constexpr auto data(C& c) -> decltype(c.data()); // freestanding |
511 | | - template<class C> constexpr auto data(const C& c) -> decltype(c.data()); // freestanding |
| 521 | + template<class C> constexpr auto |
| 522 | + data(C& c) noexcept(noexcept(c.data())) -> decltype(c.data()); // freestanding |
| 523 | + template<class C> constexpr auto |
| 524 | + data(const C& c) noexcept(noexcept(c.data())) -> decltype(c.data()); // freestanding |
512 | 525 | template<class T, size_t N> constexpr T* data(T (&array)[N]) noexcept; // freestanding |
513 | | - template<class E> constexpr const E* data(initializer_list<E> il) noexcept; // freestanding |
514 | 526 | } |
515 | 527 | \end{codeblock} |
516 | 528 |
|
|
7251 | 7263 | \libheaderrefx{inplace_vector}{inplace.vector.syn}, |
7252 | 7264 | \libheaderref{list}, |
7253 | 7265 | \libheaderrefx{map}{associative.map.syn}, |
| 7266 | +\libheaderref{optional}, |
7254 | 7267 | \libheaderrefx{regex}{re.syn}, |
7255 | 7268 | \libheaderrefx{set}{associative.set.syn}, |
7256 | 7269 | \libheaderref{span}, |
| 7270 | +\libheaderref{stacktrace}, |
7257 | 7271 | \libheaderref{string}, |
7258 | 7272 | \libheaderrefx{string_view}{string.view.synop}, |
7259 | 7273 | \libheaderrefx{unordered_map}{unord.map.syn}, |
7260 | | -\libheaderrefx{unordered_set}{unord.set.syn}, and |
| 7274 | +\libheaderrefxx{unordered_set}{unorder\-ed_set}{unord.set.syn} |
| 7275 | +\libheaderref{valarray}, and |
7261 | 7276 | \libheaderref{vector}. |
7262 | 7277 |
|
7263 | 7278 | \indexlibrary{\idxcode{begin(C\&)}}% |
7264 | 7279 | \begin{itemdecl} |
7265 | | -template<class C> constexpr auto begin(C& c) -> decltype(c.begin()); |
7266 | | -template<class C> constexpr auto begin(const C& c) -> decltype(c.begin()); |
| 7280 | +template<class C> constexpr auto begin(C& c) noexcept(noexcept(c.begin())) |
| 7281 | + -> decltype(c.begin()); |
| 7282 | +template<class C> constexpr auto begin(const C& c) noexcept(noexcept(c.begin())) |
| 7283 | + -> decltype(c.begin()); |
7267 | 7284 | \end{itemdecl} |
7268 | 7285 |
|
7269 | 7286 | \begin{itemdescr} |
|
7274 | 7291 |
|
7275 | 7292 | \indexlibrary{\idxcode{end(C\&)}}% |
7276 | 7293 | \begin{itemdecl} |
7277 | | -template<class C> constexpr auto end(C& c) -> decltype(c.end()); |
7278 | | -template<class C> constexpr auto end(const C& c) -> decltype(c.end()); |
| 7294 | +template<class C> constexpr auto end(C& c) noexcept(noexcept(c.end())) -> decltype(c.end()); |
| 7295 | +template<class C> constexpr auto end(const C& c) noexcept(noexcept(c.end())) -> decltype(c.end()); |
7279 | 7296 | \end{itemdecl} |
7280 | 7297 |
|
7281 | 7298 | \begin{itemdescr} |
|
7330 | 7347 |
|
7331 | 7348 | \indexlibrary{\idxcode{rbegin(C\&)}}% |
7332 | 7349 | \begin{itemdecl} |
7333 | | -template<class C> constexpr auto rbegin(C& c) -> decltype(c.rbegin()); |
7334 | | -template<class C> constexpr auto rbegin(const C& c) -> decltype(c.rbegin()); |
| 7350 | +template<class C> constexpr auto rbegin(C& c) noexcept(noexcept(c.rbegin())) |
| 7351 | + -> decltype(c.rbegin()); |
| 7352 | +template<class C> constexpr auto rbegin(const C& c) noexcept(noexcept(c.rbegin())) |
| 7353 | + -> decltype(c.rbegin()); |
7335 | 7354 | \end{itemdecl} |
7336 | 7355 | \begin{itemdescr} |
7337 | 7356 | \pnum |
|
7341 | 7360 |
|
7342 | 7361 | \indexlibrary{\idxcode{rend(C\&)}}% |
7343 | 7362 | \begin{itemdecl} |
7344 | | -template<class C> constexpr auto rend(C& c) -> decltype(c.rend()); |
7345 | | -template<class C> constexpr auto rend(const C& c) -> decltype(c.rend()); |
| 7363 | +template<class C> constexpr auto rend(C& c) noexcept(noexcept(c.rend())) -> decltype(c.rend()); |
| 7364 | +template<class C> constexpr auto rend(const C& c) noexcept(noexcept(c.rend())) |
| 7365 | + -> decltype(c.rend()); |
7346 | 7366 | \end{itemdecl} |
7347 | 7367 | \begin{itemdescr} |
7348 | 7368 | \pnum |
|
7352 | 7372 |
|
7353 | 7373 | \indexlibrary{\idxcode{rbegin(T (\&array)[N])}}% |
7354 | 7374 | \begin{itemdecl} |
7355 | | -template<class T, size_t N> constexpr reverse_iterator<T*> rbegin(T (&array)[N]); |
| 7375 | +template<class T, size_t N> constexpr reverse_iterator<T*> rbegin(T (&array)[N]) noexcept; |
7356 | 7376 | \end{itemdecl} |
7357 | 7377 | \begin{itemdescr} |
7358 | 7378 | \pnum |
|
7362 | 7382 |
|
7363 | 7383 | \indexlibrary{\idxcode{rend(T (\&array)[N])}}% |
7364 | 7384 | \begin{itemdecl} |
7365 | | -template<class T, size_t N> constexpr reverse_iterator<T*> rend(T (&array)[N]); |
| 7385 | +template<class T, size_t N> constexpr reverse_iterator<T*> rend(T (&array)[N]) noexcept; |
7366 | 7386 | \end{itemdecl} |
7367 | 7387 | \begin{itemdescr} |
7368 | 7388 | \pnum |
|
7372 | 7392 |
|
7373 | 7393 | \indexlibrary{\idxcode{rbegin(initializer_list<E>)}}% |
7374 | 7394 | \begin{itemdecl} |
7375 | | -template<class E> constexpr reverse_iterator<const E*> rbegin(initializer_list<E> il); |
| 7395 | +template<class E> constexpr reverse_iterator<const E*> rbegin(initializer_list<E> il) noexcept; |
7376 | 7396 | \end{itemdecl} |
7377 | 7397 | \begin{itemdescr} |
7378 | 7398 | \pnum |
|
7382 | 7402 |
|
7383 | 7403 | \indexlibrary{\idxcode{rend(initializer_list<E>)}}% |
7384 | 7404 | \begin{itemdecl} |
7385 | | -template<class E> constexpr reverse_iterator<const E*> rend(initializer_list<E> il); |
| 7405 | +template<class E> constexpr reverse_iterator<const E*> rend(initializer_list<E> il) noexcept; |
7386 | 7406 | \end{itemdecl} |
7387 | 7407 | \begin{itemdescr} |
7388 | 7408 | \pnum |
|
7392 | 7412 |
|
7393 | 7413 | \indexlibrary{\idxcode{crbegin(const C\& c)}}% |
7394 | 7414 | \begin{itemdecl} |
7395 | | -template<class C> constexpr auto crbegin(const C& c) -> decltype(std::rbegin(c)); |
| 7415 | +template<class C> constexpr auto crbegin(const C& c) noexcept(noexcept(std::rbegin(c))) |
| 7416 | + -> decltype(std::rbegin(c)); |
7396 | 7417 | \end{itemdecl} |
7397 | 7418 | \begin{itemdescr} |
7398 | 7419 | \pnum |
|
7402 | 7423 |
|
7403 | 7424 | \indexlibrary{\idxcode{crend(const C\& c)}}% |
7404 | 7425 | \begin{itemdecl} |
7405 | | -template<class C> constexpr auto crend(const C& c) -> decltype(std::rend(c)); |
| 7426 | +template<class C> constexpr auto crend(const C& c) noexcept(noexcept(c.crend())) |
| 7427 | + -> decltype(std::rend(c)); |
7406 | 7428 | \end{itemdecl} |
7407 | 7429 | \begin{itemdescr} |
7408 | 7430 | \pnum |
|
7412 | 7434 |
|
7413 | 7435 | \indexlibrary{\idxcode{size(C\& c)}}% |
7414 | 7436 | \begin{itemdecl} |
7415 | | -template<class C> constexpr auto size(const C& c) -> decltype(c.size()); |
| 7437 | +template<class C> constexpr auto size(const C& c) noexcept(noexcept(c.size())) |
| 7438 | + -> decltype(c.size()); |
7416 | 7439 | \end{itemdecl} |
7417 | 7440 | \begin{itemdescr} |
7418 | 7441 | \pnum |
|
7432 | 7455 |
|
7433 | 7456 | \indexlibrary{\idxcode{ssize(C\& c)}}% |
7434 | 7457 | \begin{itemdecl} |
7435 | | -template<class C> constexpr auto ssize(const C& c) |
| 7458 | +template<class C> constexpr auto ssize(const C& c) noexcept(noexcept(c.size())) |
7436 | 7459 | -> common_type_t<ptrdiff_t, make_signed_t<decltype(c.size())>>; |
7437 | 7460 | \end{itemdecl} |
7438 | 7461 | \begin{itemdescr} |
|
7456 | 7479 |
|
7457 | 7480 | \indexlibrary{\idxcode{empty(C\& c)}}% |
7458 | 7481 | \begin{itemdecl} |
7459 | | -template<class C> constexpr auto empty(const C& c) -> decltype(c.empty()); |
| 7482 | +template<class C> constexpr auto empty(const C& c) noexcept(noexcept(c.empty())) |
| 7483 | + -> decltype(c.empty()); |
7460 | 7484 | \end{itemdecl} |
7461 | 7485 | \begin{itemdescr} |
7462 | 7486 | \pnum |
|
7474 | 7498 | \tcode{false}. |
7475 | 7499 | \end{itemdescr} |
7476 | 7500 |
|
7477 | | -\indexlibrary{\idxcode{empty(initializer_list<E>)}}% |
7478 | | -\begin{itemdecl} |
7479 | | -template<class E> constexpr bool empty(initializer_list<E> il) noexcept; |
7480 | | -\end{itemdecl} |
7481 | | -\begin{itemdescr} |
7482 | | -\pnum |
7483 | | -\returns |
7484 | | -\tcode{il.size() == 0}. |
7485 | | -\end{itemdescr} |
7486 | | - |
7487 | 7501 | \indexlibrary{\idxcode{data(C\& c)}}% |
7488 | 7502 | \begin{itemdecl} |
7489 | | -template<class C> constexpr auto data(C& c) -> decltype(c.data()); |
7490 | | -template<class C> constexpr auto data(const C& c) -> decltype(c.data()); |
| 7503 | +template<class C> constexpr auto data(C& c) noexcept(noexcept(c.data())) -> decltype(c.data()); |
| 7504 | +template<class C> constexpr auto data(const C& c) noexcept(noexcept(c.data())) |
| 7505 | + -> decltype(c.data()); |
7491 | 7506 | \end{itemdecl} |
7492 | 7507 | \begin{itemdescr} |
7493 | 7508 | \pnum |
|
7504 | 7519 | \returns |
7505 | 7520 | \tcode{array}. |
7506 | 7521 | \end{itemdescr} |
7507 | | - |
7508 | | -\indexlibrary{\idxcode{data(initializer_list<E>)}}% |
7509 | | -\begin{itemdecl} |
7510 | | -template<class E> constexpr const E* data(initializer_list<E> il) noexcept; |
7511 | | -\end{itemdecl} |
7512 | | -\begin{itemdescr} |
7513 | | -\pnum |
7514 | | -\returns |
7515 | | -\tcode{il.begin()}. |
7516 | | -\end{itemdescr} |
|
0 commit comments