|
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 |
|
|
7250 | 7262 | \libheaderrefx{inplace_vector}{inplace.vector.syn}, |
7251 | 7263 | \libheaderref{list}, |
7252 | 7264 | \libheaderrefx{map}{associative.map.syn}, |
| 7265 | +\libheaderref{optional}, |
7253 | 7266 | \libheaderrefx{regex}{re.syn}, |
7254 | 7267 | \libheaderrefx{set}{associative.set.syn}, |
7255 | 7268 | \libheaderref{span}, |
| 7269 | +\libheaderref{stacktrace}, |
7256 | 7270 | \libheaderref{string}, |
7257 | 7271 | \libheaderrefx{string_view}{string.view.synop}, |
7258 | 7272 | \libheaderrefx{unordered_map}{unord.map.syn}, |
7259 | | -\libheaderrefx{unordered_set}{unord.set.syn}, and |
| 7273 | +\libheaderrefx{unordered_set}{unord.set.syn} |
| 7274 | +\libheaderref{valarray}, and |
7260 | 7275 | \libheaderref{vector}. |
7261 | 7276 |
|
7262 | 7277 | \indexlibrary{\idxcode{begin(C\&)}}% |
7263 | 7278 | \begin{itemdecl} |
7264 | | -template<class C> constexpr auto begin(C& c) -> decltype(c.begin()); |
7265 | | -template<class C> constexpr auto begin(const C& c) -> decltype(c.begin()); |
| 7279 | +template<class C> constexpr auto begin(C& c) noexcept(noexcept(c.begin())) |
| 7280 | + -> decltype(c.begin()); |
| 7281 | +template<class C> constexpr auto begin(const C& c) noexcept(noexcept(c.begin())) |
| 7282 | + -> decltype(c.begin()); |
7266 | 7283 | \end{itemdecl} |
7267 | 7284 |
|
7268 | 7285 | \begin{itemdescr} |
|
7273 | 7290 |
|
7274 | 7291 | \indexlibrary{\idxcode{end(C\&)}}% |
7275 | 7292 | \begin{itemdecl} |
7276 | | -template<class C> constexpr auto end(C& c) -> decltype(c.end()); |
7277 | | -template<class C> constexpr auto end(const C& c) -> decltype(c.end()); |
| 7293 | +template<class C> constexpr auto end(C& c) noexcept(noexcept(c.end())) -> decltype(c.end()); |
| 7294 | +template<class C> constexpr auto end(const C& c) noexcept(noexcept(c.end())) -> decltype(c.end()); |
7278 | 7295 | \end{itemdecl} |
7279 | 7296 |
|
7280 | 7297 | \begin{itemdescr} |
|
7329 | 7346 |
|
7330 | 7347 | \indexlibrary{\idxcode{rbegin(C\&)}}% |
7331 | 7348 | \begin{itemdecl} |
7332 | | -template<class C> constexpr auto rbegin(C& c) -> decltype(c.rbegin()); |
7333 | | -template<class C> constexpr auto rbegin(const C& c) -> decltype(c.rbegin()); |
| 7349 | +template<class C> constexpr auto rbegin(C& c) noexcept(noexcept(c.rbegin())) |
| 7350 | + -> decltype(c.rbegin()); |
| 7351 | +template<class C> constexpr auto rbegin(const C& c) noexcept(noexcept(c.rbegin())) |
| 7352 | + -> decltype(c.rbegin()); |
7334 | 7353 | \end{itemdecl} |
7335 | 7354 | \begin{itemdescr} |
7336 | 7355 | \pnum |
|
7340 | 7359 |
|
7341 | 7360 | \indexlibrary{\idxcode{rend(C\&)}}% |
7342 | 7361 | \begin{itemdecl} |
7343 | | -template<class C> constexpr auto rend(C& c) -> decltype(c.rend()); |
7344 | | -template<class C> constexpr auto rend(const C& c) -> decltype(c.rend()); |
| 7362 | +template<class C> constexpr auto rend(C& c) noexcept(noexcept(c.rend())) -> decltype(c.rend()); |
| 7363 | +template<class C> constexpr auto rend(const C& c) noexcept(noexcept(c.rend())) |
| 7364 | + -> decltype(c.rend()); |
7345 | 7365 | \end{itemdecl} |
7346 | 7366 | \begin{itemdescr} |
7347 | 7367 | \pnum |
|
7351 | 7371 |
|
7352 | 7372 | \indexlibrary{\idxcode{rbegin(T (\&array)[N])}}% |
7353 | 7373 | \begin{itemdecl} |
7354 | | -template<class T, size_t N> constexpr reverse_iterator<T*> rbegin(T (&array)[N]); |
| 7374 | +template<class T, size_t N> constexpr reverse_iterator<T*> rbegin(T (&array)[N]) noexcept; |
7355 | 7375 | \end{itemdecl} |
7356 | 7376 | \begin{itemdescr} |
7357 | 7377 | \pnum |
|
7361 | 7381 |
|
7362 | 7382 | \indexlibrary{\idxcode{rend(T (\&array)[N])}}% |
7363 | 7383 | \begin{itemdecl} |
7364 | | -template<class T, size_t N> constexpr reverse_iterator<T*> rend(T (&array)[N]); |
| 7384 | +template<class T, size_t N> constexpr reverse_iterator<T*> rend(T (&array)[N]) noexcept; |
7365 | 7385 | \end{itemdecl} |
7366 | 7386 | \begin{itemdescr} |
7367 | 7387 | \pnum |
|
7371 | 7391 |
|
7372 | 7392 | \indexlibrary{\idxcode{rbegin(initializer_list<E>)}}% |
7373 | 7393 | \begin{itemdecl} |
7374 | | -template<class E> constexpr reverse_iterator<const E*> rbegin(initializer_list<E> il); |
| 7394 | +template<class E> constexpr reverse_iterator<const E*> rbegin(initializer_list<E> il) noexcept; |
7375 | 7395 | \end{itemdecl} |
7376 | 7396 | \begin{itemdescr} |
7377 | 7397 | \pnum |
|
7381 | 7401 |
|
7382 | 7402 | \indexlibrary{\idxcode{rend(initializer_list<E>)}}% |
7383 | 7403 | \begin{itemdecl} |
7384 | | -template<class E> constexpr reverse_iterator<const E*> rend(initializer_list<E> il); |
| 7404 | +template<class E> constexpr reverse_iterator<const E*> rend(initializer_list<E> il) noexcept; |
7385 | 7405 | \end{itemdecl} |
7386 | 7406 | \begin{itemdescr} |
7387 | 7407 | \pnum |
|
7391 | 7411 |
|
7392 | 7412 | \indexlibrary{\idxcode{crbegin(const C\& c)}}% |
7393 | 7413 | \begin{itemdecl} |
7394 | | -template<class C> constexpr auto crbegin(const C& c) -> decltype(std::rbegin(c)); |
| 7414 | +template<class C> constexpr auto crbegin(const C& c) noexcept(noexcept(c.crbegin())) |
| 7415 | + -> decltype(std::rbegin(c)); |
7395 | 7416 | \end{itemdecl} |
7396 | 7417 | \begin{itemdescr} |
7397 | 7418 | \pnum |
|
7401 | 7422 |
|
7402 | 7423 | \indexlibrary{\idxcode{crend(const C\& c)}}% |
7403 | 7424 | \begin{itemdecl} |
7404 | | -template<class C> constexpr auto crend(const C& c) -> decltype(std::rend(c)); |
| 7425 | +template<class C> constexpr auto crend(const C& c) noexcept(noexcept(c.crend())) |
| 7426 | + -> decltype(std::rend(c)); |
7405 | 7427 | \end{itemdecl} |
7406 | 7428 | \begin{itemdescr} |
7407 | 7429 | \pnum |
|
7411 | 7433 |
|
7412 | 7434 | \indexlibrary{\idxcode{size(C\& c)}}% |
7413 | 7435 | \begin{itemdecl} |
7414 | | -template<class C> constexpr auto size(const C& c) -> decltype(c.size()); |
| 7436 | +template<class C> constexpr auto size(const C& c) noexcept(noexcept(c.size())) |
| 7437 | + -> decltype(c.size()); |
7415 | 7438 | \end{itemdecl} |
7416 | 7439 | \begin{itemdescr} |
7417 | 7440 | \pnum |
|
7431 | 7454 |
|
7432 | 7455 | \indexlibrary{\idxcode{ssize(C\& c)}}% |
7433 | 7456 | \begin{itemdecl} |
7434 | | -template<class C> constexpr auto ssize(const C& c) |
| 7457 | +template<class C> constexpr auto ssize(const C& c) noexcept(noexcept(c.ssize())) |
7435 | 7458 | -> common_type_t<ptrdiff_t, make_signed_t<decltype(c.size())>>; |
7436 | 7459 | \end{itemdecl} |
7437 | 7460 | \begin{itemdescr} |
|
7455 | 7478 |
|
7456 | 7479 | \indexlibrary{\idxcode{empty(C\& c)}}% |
7457 | 7480 | \begin{itemdecl} |
7458 | | -template<class C> constexpr auto empty(const C& c) -> decltype(c.empty()); |
| 7481 | +template<class C> constexpr auto empty(const C& c) noexcept(noexcept(c.empty())) |
| 7482 | + -> decltype(c.empty()); |
7459 | 7483 | \end{itemdecl} |
7460 | 7484 | \begin{itemdescr} |
7461 | 7485 | \pnum |
|
7473 | 7497 | \tcode{false}. |
7474 | 7498 | \end{itemdescr} |
7475 | 7499 |
|
7476 | | -\indexlibrary{\idxcode{empty(initializer_list<E>)}}% |
7477 | | -\begin{itemdecl} |
7478 | | -template<class E> constexpr bool empty(initializer_list<E> il) noexcept; |
7479 | | -\end{itemdecl} |
7480 | | -\begin{itemdescr} |
7481 | | -\pnum |
7482 | | -\returns |
7483 | | -\tcode{il.size() == 0}. |
7484 | | -\end{itemdescr} |
7485 | | - |
7486 | 7500 | \indexlibrary{\idxcode{data(C\& c)}}% |
7487 | 7501 | \begin{itemdecl} |
7488 | | -template<class C> constexpr auto data(C& c) -> decltype(c.data()); |
7489 | | -template<class C> constexpr auto data(const C& c) -> decltype(c.data()); |
| 7502 | +template<class C> constexpr auto data(C& c) noexcept(noexcept(c.data())) -> decltype(c.data()); |
| 7503 | +template<class C> constexpr auto data(const C& c) noexcept(noexcept(c.data())) |
| 7504 | + -> decltype(c.data()); |
7490 | 7505 | \end{itemdecl} |
7491 | 7506 | \begin{itemdescr} |
7492 | 7507 | \pnum |
|
7503 | 7518 | \returns |
7504 | 7519 | \tcode{array}. |
7505 | 7520 | \end{itemdescr} |
7506 | | - |
7507 | | -\indexlibrary{\idxcode{data(initializer_list<E>)}}% |
7508 | | -\begin{itemdecl} |
7509 | | -template<class E> constexpr const E* data(initializer_list<E> il) noexcept; |
7510 | | -\end{itemdecl} |
7511 | | -\begin{itemdescr} |
7512 | | -\pnum |
7513 | | -\returns |
7514 | | -\tcode{il.begin()}. |
7515 | | -\end{itemdescr} |
|
0 commit comments