|
2441 | 2441 |
|
2442 | 2442 | // \ref{optional.specalg}, specialized algorithms
|
2443 | 2443 | template<class T>
|
2444 |
| - void swap(optional<T>&, optional<T>&) noexcept(@\seebelow@); |
| 2444 | + constexpr void swap(optional<T>&, optional<T>&) noexcept(@\seebelow@); |
2445 | 2445 |
|
2446 | 2446 | template<class T>
|
2447 | 2447 | constexpr optional<@\seebelow@> make_optional(T&&);
|
|
2481 | 2481 | template<class U = T>
|
2482 | 2482 | constexpr explicit(@\seebelow@) optional(U&&);
|
2483 | 2483 | template<class U>
|
2484 |
| - explicit(@\seebelow@) optional(const optional<U>&); |
| 2484 | + constexpr explicit(@\seebelow@) optional(const optional<U>&); |
2485 | 2485 | template<class U>
|
2486 |
| - explicit(@\seebelow@) optional(optional<U>&&); |
| 2486 | + constexpr explicit(@\seebelow@) optional(optional<U>&&); |
2487 | 2487 |
|
2488 | 2488 | // \ref{optional.dtor}, destructor
|
2489 |
| - ~optional(); |
| 2489 | + constexpr ~optional(); |
2490 | 2490 |
|
2491 | 2491 | // \ref{optional.assign}, assignment
|
2492 |
| - optional& operator=(nullopt_t) noexcept; |
| 2492 | + constexpr optional& operator=(nullopt_t) noexcept; |
2493 | 2493 | constexpr optional& operator=(const optional&);
|
2494 | 2494 | constexpr optional& operator=(optional&&) noexcept(@\seebelow@);
|
2495 |
| - template<class U = T> optional& operator=(U&&); |
2496 |
| - template<class U> optional& operator=(const optional<U>&); |
2497 |
| - template<class U> optional& operator=(optional<U>&&); |
2498 |
| - template<class... Args> T& emplace(Args&&...); |
2499 |
| - template<class U, class... Args> T& emplace(initializer_list<U>, Args&&...); |
| 2495 | + template<class U = T> constexpr optional& operator=(U&&); |
| 2496 | + template<class U> constexpr optional& operator=(const optional<U>&); |
| 2497 | + template<class U> constexpr optional& operator=(optional<U>&&); |
| 2498 | + template<class... Args> constexpr T& emplace(Args&&...); |
| 2499 | + template<class U, class... Args> constexpr T& emplace(initializer_list<U>, Args&&...); |
2500 | 2500 |
|
2501 | 2501 | // \ref{optional.swap}, swap
|
2502 |
| - void swap(optional&) noexcept(@\seebelow@); |
| 2502 | + constexpr void swap(optional&) noexcept(@\seebelow@); |
2503 | 2503 |
|
2504 | 2504 | // \ref{optional.observe}, observers
|
2505 | 2505 | constexpr const T* operator->() const;
|
|
2518 | 2518 | template<class U> constexpr T value_or(U&&) &&;
|
2519 | 2519 |
|
2520 | 2520 | // \ref{optional.mod}, modifiers
|
2521 |
| - void reset() noexcept; |
| 2521 | + constexpr void reset() noexcept; |
2522 | 2522 |
|
2523 | 2523 | private:
|
2524 | 2524 | T *val; // \expos
|
|
2718 | 2718 |
|
2719 | 2719 | \indexlibraryctor{optional}%
|
2720 | 2720 | \begin{itemdecl}
|
2721 |
| -template<class U> explicit(@\seebelow@) optional(const optional<U>& rhs); |
| 2721 | +template<class U> constexpr explicit(@\seebelow@) optional(const optional<U>& rhs); |
2722 | 2722 | \end{itemdecl}
|
2723 | 2723 |
|
2724 | 2724 | \begin{itemdescr}
|
|
2760 | 2760 |
|
2761 | 2761 | \indexlibraryctor{optional}%
|
2762 | 2762 | \begin{itemdecl}
|
2763 |
| -template<class U> explicit(@\seebelow@) optional(optional<U>&& rhs); |
| 2763 | +template<class U> constexpr explicit(@\seebelow@) optional(optional<U>&& rhs); |
2764 | 2764 | \end{itemdecl}
|
2765 | 2765 |
|
2766 | 2766 | \begin{itemdescr}
|
|
2805 | 2805 |
|
2806 | 2806 | \indexlibrarydtor{optional}%
|
2807 | 2807 | \begin{itemdecl}
|
2808 |
| -~optional(); |
| 2808 | +constexpr ~optional(); |
2809 | 2809 | \end{itemdecl}
|
2810 | 2810 |
|
2811 | 2811 | \begin{itemdescr}
|
|
2825 | 2825 |
|
2826 | 2826 | \indexlibrarymember{operator=}{optional}%
|
2827 | 2827 | \begin{itemdecl}
|
2828 |
| -optional<T>& operator=(nullopt_t) noexcept; |
| 2828 | +constexpr optional<T>& operator=(nullopt_t) noexcept; |
2829 | 2829 | \end{itemdecl}
|
2830 | 2830 |
|
2831 | 2831 | \begin{itemdescr}
|
|
2946 | 2946 |
|
2947 | 2947 | \indexlibrarymember{operator=}{optional}%
|
2948 | 2948 | \begin{itemdecl}
|
2949 |
| -template<class U = T> optional<T>& operator=(U&& v); |
| 2949 | +template<class U = T> constexpr optional<T>& operator=(U&& v); |
2950 | 2950 | \end{itemdecl}
|
2951 | 2951 |
|
2952 | 2952 | \begin{itemdescr}
|
|
2976 | 2976 |
|
2977 | 2977 | \indexlibrarymember{operator=}{optional}%
|
2978 | 2978 | \begin{itemdecl}
|
2979 |
| -template<class U> optional<T>& operator=(const optional<U>& rhs); |
| 2979 | +template<class U> constexpr optional<T>& operator=(const optional<U>& rhs); |
2980 | 2980 | \end{itemdecl}
|
2981 | 2981 |
|
2982 | 2982 | \begin{itemdescr}
|
|
3039 | 3039 |
|
3040 | 3040 | \indexlibrarymember{operator=}{optional}%
|
3041 | 3041 | \begin{itemdecl}
|
3042 |
| -template<class U> optional<T>& operator=(optional<U>&& rhs); |
| 3042 | +template<class U> constexpr optional<T>& operator=(optional<U>&& rhs); |
3043 | 3043 | \end{itemdecl}
|
3044 | 3044 |
|
3045 | 3045 | \begin{itemdescr}
|
|
3103 | 3103 |
|
3104 | 3104 | \indexlibrarymember{emplace}{optional}%
|
3105 | 3105 | \begin{itemdecl}
|
3106 |
| -template<class... Args> T& emplace(Args&&... args); |
| 3106 | +template<class... Args> constexpr T& emplace(Args&&... args); |
3107 | 3107 | \end{itemdecl}
|
3108 | 3108 |
|
3109 | 3109 | \begin{itemdescr}
|
|
3134 | 3134 |
|
3135 | 3135 | \indexlibrarymember{emplace}{optional}%
|
3136 | 3136 | \begin{itemdecl}
|
3137 |
| -template<class U, class... Args> T& emplace(initializer_list<U> il, Args&&... args); |
| 3137 | +template<class U, class... Args> constexpr T& emplace(initializer_list<U> il, Args&&... args); |
3138 | 3138 | \end{itemdecl}
|
3139 | 3139 |
|
3140 | 3140 | \begin{itemdescr}
|
|
3167 | 3167 |
|
3168 | 3168 | \indexlibrarymember{swap}{optional}%
|
3169 | 3169 | \begin{itemdecl}
|
3170 |
| -void swap(optional& rhs) noexcept(@\seebelow@); |
| 3170 | +constexpr void swap(optional& rhs) noexcept(@\seebelow@); |
3171 | 3171 | \end{itemdecl}
|
3172 | 3172 |
|
3173 | 3173 | \begin{itemdescr}
|
|
3388 | 3388 |
|
3389 | 3389 | \indexlibrarymember{reset}{optional}%
|
3390 | 3390 | \begin{itemdecl}
|
3391 |
| -void reset() noexcept; |
| 3391 | +constexpr void reset() noexcept; |
3392 | 3392 | \end{itemdecl}
|
3393 | 3393 |
|
3394 | 3394 | \begin{itemdescr}
|
|
3847 | 3847 |
|
3848 | 3848 | \indexlibrarymember{swap}{optional}%
|
3849 | 3849 | \begin{itemdecl}
|
3850 |
| -template<class T> void swap(optional<T>& x, optional<T>& y) noexcept(noexcept(x.swap(y))); |
| 3850 | +template<class T> |
| 3851 | + constexpr void swap(optional<T>& x, optional<T>& y) noexcept(noexcept(x.swap(y))); |
3851 | 3852 | \end{itemdecl}
|
3852 | 3853 |
|
3853 | 3854 | \begin{itemdescr}
|
|
4023 | 4024 |
|
4024 | 4025 | // \ref{variant.specalg}, specialized algorithms
|
4025 | 4026 | template<class... Types>
|
4026 |
| - void swap(variant<Types...>&, variant<Types...>&) noexcept(@\seebelow@); |
| 4027 | + constexpr void swap(variant<Types...>&, variant<Types...>&) noexcept(@\seebelow@); |
4027 | 4028 |
|
4028 | 4029 | // \ref{variant.bad.access}, class \tcode{bad_variant_access}
|
4029 | 4030 | class bad_variant_access;
|
|
4070 | 4071 | constexpr variant& operator=(const variant&);
|
4071 | 4072 | constexpr variant& operator=(variant&&) noexcept(@\seebelow@);
|
4072 | 4073 |
|
4073 |
| - template<class T> variant& operator=(T&&) noexcept(@\seebelow@); |
| 4074 | + template<class T> constexpr variant& operator=(T&&) noexcept(@\seebelow@); |
4074 | 4075 |
|
4075 | 4076 | // \ref{variant.mod}, modifiers
|
4076 | 4077 | template<class T, class... Args>
|
4077 |
| - T& emplace(Args&&...); |
| 4078 | + constexpr T& emplace(Args&&...); |
4078 | 4079 | template<class T, class U, class... Args>
|
4079 |
| - T& emplace(initializer_list<U>, Args&&...); |
| 4080 | + constexpr T& emplace(initializer_list<U>, Args&&...); |
4080 | 4081 | template<size_t I, class... Args>
|
4081 |
| - variant_alternative_t<I, variant<Types...>>& emplace(Args&&...); |
| 4082 | + constexpr variant_alternative_t<I, variant<Types...>>& emplace(Args&&...); |
4082 | 4083 | template<size_t I, class U, class... Args>
|
4083 |
| - variant_alternative_t<I, variant<Types...>>& emplace(initializer_list<U>, Args&&...); |
| 4084 | + constexpr variant_alternative_t<I, variant<Types...>>& |
| 4085 | + emplace(initializer_list<U>, Args&&...); |
4084 | 4086 |
|
4085 | 4087 | // \ref{variant.status}, value status
|
4086 | 4088 | constexpr bool valueless_by_exception() const noexcept;
|
4087 | 4089 | constexpr size_t index() const noexcept;
|
4088 | 4090 |
|
4089 | 4091 | // \ref{variant.swap}, swap
|
4090 |
| - void swap(variant&) noexcept(@\seebelow@); |
| 4092 | + constexpr void swap(variant&) noexcept(@\seebelow@); |
4091 | 4093 | };
|
4092 | 4094 | }
|
4093 | 4095 | \end{codeblock}
|
|
4413 | 4415 |
|
4414 | 4416 | \indexlibrarydtor{variant}%
|
4415 | 4417 | \begin{itemdecl}
|
4416 |
| -~variant(); |
| 4418 | +constexpr ~variant(); |
4417 | 4419 | \end{itemdecl}
|
4418 | 4420 |
|
4419 | 4421 | \begin{itemdescr}
|
|
4532 | 4534 |
|
4533 | 4535 | \indexlibrarymember{operator=}{variant}%
|
4534 | 4536 | \begin{itemdecl}
|
4535 |
| -template<class T> variant& operator=(T&& t) noexcept(@\seebelow@); |
| 4537 | +template<class T> constexpr variant& operator=(T&& t) noexcept(@\seebelow@); |
4536 | 4538 | \end{itemdecl}
|
4537 | 4539 |
|
4538 | 4540 | \begin{itemdescr}
|
|
4614 | 4616 |
|
4615 | 4617 | \indexlibrarymember{emplace}{variant}%
|
4616 | 4618 | \begin{itemdecl}
|
4617 |
| -template<class T, class... Args> T& emplace(Args&&... args); |
| 4619 | +template<class T, class... Args> constexpr T& emplace(Args&&... args); |
4618 | 4620 | \end{itemdecl}
|
4619 | 4621 |
|
4620 | 4622 | \begin{itemdescr}
|
|
4634 | 4636 |
|
4635 | 4637 | \indexlibrarymember{emplace}{variant}%
|
4636 | 4638 | \begin{itemdecl}
|
4637 |
| -template<class T, class U, class... Args> T& emplace(initializer_list<U> il, Args&&... args); |
| 4639 | +template<class T, class U, class... Args> |
| 4640 | + constexpr T& emplace(initializer_list<U> il, Args&&... args); |
4638 | 4641 | \end{itemdecl}
|
4639 | 4642 |
|
4640 | 4643 | \begin{itemdescr}
|
|
4655 | 4658 | \indexlibrarymember{emplace}{variant}%
|
4656 | 4659 | \begin{itemdecl}
|
4657 | 4660 | template<size_t I, class... Args>
|
4658 |
| - variant_alternative_t<I, variant<Types...>>& emplace(Args&&... args); |
| 4661 | + constexpr variant_alternative_t<I, variant<Types...>>& emplace(Args&&... args); |
4659 | 4662 | \end{itemdecl}
|
4660 | 4663 |
|
4661 | 4664 | \begin{itemdescr} % NOCHECK: order
|
|
4696 | 4699 | \indexlibrarymember{emplace}{variant}%
|
4697 | 4700 | \begin{itemdecl}
|
4698 | 4701 | template<size_t I, class U, class... Args>
|
4699 |
| - variant_alternative_t<I, variant<Types...>>& emplace(initializer_list<U> il, Args&&... args); |
| 4702 | + constexpr variant_alternative_t<I, variant<Types...>>& |
| 4703 | + emplace(initializer_list<U> il, Args&&... args); |
4700 | 4704 | \end{itemdecl}
|
4701 | 4705 |
|
4702 | 4706 | \begin{itemdescr} % NOCHECK: order
|
|
4777 | 4781 |
|
4778 | 4782 | \indexlibrarymember{swap}{variant}%
|
4779 | 4783 | \begin{itemdecl}
|
4780 |
| -void swap(variant& rhs) noexcept(@\seebelow@); |
| 4784 | +constexpr void swap(variant& rhs) noexcept(@\seebelow@); |
4781 | 4785 | \end{itemdecl}
|
4782 | 4786 |
|
4783 | 4787 | \begin{itemdescr}
|
|
5249 | 5253 | \indexlibrarymember{swap}{variant}%
|
5250 | 5254 | \begin{itemdecl}
|
5251 | 5255 | template<class... Types>
|
5252 |
| - void swap(variant<Types...>& v, variant<Types...>& w) noexcept(@\seebelow@); |
| 5256 | + constexpr void swap(variant<Types...>& v, variant<Types...>& w) noexcept(@\seebelow@); |
5253 | 5257 | \end{itemdecl}
|
5254 | 5258 |
|
5255 | 5259 | \begin{itemdescr}
|
|
0 commit comments