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