|
3269 | 3269 | constexpr explicit optional(in_place_t, Args&&...);
|
3270 | 3270 | template<class U, class... Args>
|
3271 | 3271 | constexpr explicit optional(in_place_t, initializer_list<U>, Args&&...);
|
3272 |
| - template<class U = T> |
| 3272 | + template<class U = remove_cv_t<T>> |
3273 | 3273 | constexpr explicit(@\seebelow@) optional(U&&);
|
3274 | 3274 | template<class U>
|
3275 | 3275 | constexpr explicit(@\seebelow@) optional(const optional<U>&);
|
|
3283 | 3283 | constexpr optional& operator=(nullopt_t) noexcept;
|
3284 | 3284 | constexpr optional& operator=(const optional&);
|
3285 | 3285 | constexpr optional& operator=(optional&&) noexcept(@\seebelow@);
|
3286 |
| - template<class U = T> constexpr optional& operator=(U&&); |
| 3286 | + template<class U = remove_cv_t<T>> constexpr optional& operator=(U&&); |
3287 | 3287 | template<class U> constexpr optional& operator=(const optional<U>&);
|
3288 | 3288 | template<class U> constexpr optional& operator=(optional<U>&&);
|
3289 | 3289 | template<class... Args> constexpr T& emplace(Args&&...);
|
|
3311 | 3311 | constexpr T& value() &; // freestanding-deleted
|
3312 | 3312 | constexpr T&& value() &&; // freestanding-deleted
|
3313 | 3313 | constexpr const T&& value() const &&; // freestanding-deleted
|
3314 |
| - template<class U> constexpr T value_or(U&&) const &; |
3315 |
| - template<class U> constexpr T value_or(U&&) &&; |
| 3314 | + template<class U = remove_cv_t<T>> constexpr T value_or(U&&) const &; |
| 3315 | + template<class U = remove_cv_t<T>> constexpr T value_or(U&&) &&; |
3316 | 3316 |
|
3317 | 3317 | // \ref{optional.monadic}, monadic operations
|
3318 | 3318 | template<class F> constexpr auto and_then(F&& f) &;
|
|
3504 | 3504 |
|
3505 | 3505 | \indexlibraryctor{optional}%
|
3506 | 3506 | \begin{itemdecl}
|
3507 |
| -template<class U = T> constexpr explicit(@\seebelow@) optional(U&& v); |
| 3507 | +template<class U = remove_cv_t<T>> constexpr explicit(@\seebelow@) optional(U&& v); |
3508 | 3508 | \end{itemdecl}
|
3509 | 3509 |
|
3510 | 3510 | \begin{itemdescr}
|
|
3756 | 3756 |
|
3757 | 3757 | \indexlibrarymember{operator=}{optional}%
|
3758 | 3758 | \begin{itemdecl}
|
3759 |
| -template<class U = T> constexpr optional<T>& operator=(U&& v); |
| 3759 | +template<class U = remove_cv_t<T>> constexpr optional& operator=(U&& v); |
3760 | 3760 | \end{itemdecl}
|
3761 | 3761 |
|
3762 | 3762 | \begin{itemdescr}
|
|
4193 | 4193 |
|
4194 | 4194 | \indexlibrarymember{value_or}{optional}%
|
4195 | 4195 | \begin{itemdecl}
|
4196 |
| -template<class U> constexpr T value_or(U&& v) const &; |
| 4196 | +template<class U = remove_cv_t<T>> constexpr T value_or(U&& v) const &; |
4197 | 4197 | \end{itemdecl}
|
4198 | 4198 |
|
4199 | 4199 | \begin{itemdescr}
|
|
4211 | 4211 |
|
4212 | 4212 | \indexlibrarymember{value_or}{optional}%
|
4213 | 4213 | \begin{itemdecl}
|
4214 |
| -template<class U> constexpr T value_or(U&& v) &&; |
| 4214 | +template<class U = remove_cv_t<T>> constexpr T value_or(U&& v) &&; |
4215 | 4215 | \end{itemdecl}
|
4216 | 4216 |
|
4217 | 4217 | \begin{itemdescr}
|
|
7440 | 7440 | template<class U, class G>
|
7441 | 7441 | constexpr explicit(@\seebelow@) expected(expected<U, G>&&);
|
7442 | 7442 |
|
7443 |
| - template<class U = T> |
| 7443 | + template<class U = remove_cv_t<T>> |
7444 | 7444 | constexpr explicit(@\seebelow@) expected(U&& v);
|
7445 | 7445 |
|
7446 | 7446 | template<class G>
|
|
7463 | 7463 | // \ref{expected.object.assign}, assignment
|
7464 | 7464 | constexpr expected& operator=(const expected&);
|
7465 | 7465 | constexpr expected& operator=(expected&&) noexcept(@\seebelow@);
|
7466 |
| - template<class U = T> constexpr expected& operator=(U&&); |
| 7466 | + template<class U = remove_cv_t<T>> constexpr expected& operator=(U&&); |
7467 | 7467 | template<class G>
|
7468 | 7468 | constexpr expected& operator=(const unexpected<G>&);
|
7469 | 7469 | template<class G>
|
|
7495 | 7495 | constexpr E& error() & noexcept;
|
7496 | 7496 | constexpr const E&& error() const && noexcept;
|
7497 | 7497 | constexpr E&& error() && noexcept;
|
7498 |
| - template<class U> constexpr T value_or(U&&) const &; |
7499 |
| - template<class U> constexpr T value_or(U&&) &&; |
| 7498 | + template<class U = remove_cv_t<T>> constexpr T value_or(U&&) const &; |
| 7499 | + template<class U = remove_cv_t<T>> constexpr T value_or(U&&) &&; |
7500 | 7500 | template<class G = E> constexpr E error_or(G&&) const &;
|
7501 | 7501 | template<class G = E> constexpr E error_or(G&&) &&;
|
7502 | 7502 |
|
|
7747 | 7747 |
|
7748 | 7748 | \indexlibraryctor{expected}%
|
7749 | 7749 | \begin{itemdecl}
|
7750 |
| -template<class U = T> |
| 7750 | +template<class U = remove_cv_t<T>> |
7751 | 7751 | constexpr explicit(!is_convertible_v<U, T>) expected(U&& v);
|
7752 | 7752 | \end{itemdecl}
|
7753 | 7753 |
|
|
8066 | 8066 |
|
8067 | 8067 | \indexlibrarymember{operator=}{expected}%
|
8068 | 8068 | \begin{itemdecl}
|
8069 |
| -template<class U = T> |
| 8069 | +template<class U = remove_cv_t<T>> |
8070 | 8070 | constexpr expected& operator=(U&& v);
|
8071 | 8071 | \end{itemdecl}
|
8072 | 8072 |
|
|
8434 | 8434 |
|
8435 | 8435 | \indexlibrarymember{value_or}{expected}%
|
8436 | 8436 | \begin{itemdecl}
|
8437 |
| -template<class U> constexpr T value_or(U&& v) const &; |
| 8437 | +template<class U = remove_cv_t<T>> constexpr T value_or(U&& v) const &; |
8438 | 8438 | \end{itemdecl}
|
8439 | 8439 |
|
8440 | 8440 | \begin{itemdescr}
|
|
8450 | 8450 |
|
8451 | 8451 | \indexlibrarymember{value_or}{expected}%
|
8452 | 8452 | \begin{itemdecl}
|
8453 |
| -template<class U> constexpr T value_or(U&& v) &&; |
| 8453 | +template<class U = remove_cv_t<T>> constexpr T value_or(U&& v) &&; |
8454 | 8454 | \end{itemdecl}
|
8455 | 8455 |
|
8456 | 8456 | \begin{itemdescr}
|
|
0 commit comments