Skip to content

Commit 577e88b

Browse files
burblebeetkoeppe
authored andcommitted
LWG3886 Monad mo' problems
[optional.assign] Removed "<T>" from declaration to match that in synopsis.
1 parent d6cb55f commit 577e88b

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

source/utilities.tex

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3269,7 +3269,7 @@
32693269
constexpr explicit optional(in_place_t, Args&&...);
32703270
template<class U, class... Args>
32713271
constexpr explicit optional(in_place_t, initializer_list<U>, Args&&...);
3272-
template<class U = T>
3272+
template<class U = remove_cv_t<T>>
32733273
constexpr explicit(@\seebelow@) optional(U&&);
32743274
template<class U>
32753275
constexpr explicit(@\seebelow@) optional(const optional<U>&);
@@ -3283,7 +3283,7 @@
32833283
constexpr optional& operator=(nullopt_t) noexcept;
32843284
constexpr optional& operator=(const optional&);
32853285
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&&);
32873287
template<class U> constexpr optional& operator=(const optional<U>&);
32883288
template<class U> constexpr optional& operator=(optional<U>&&);
32893289
template<class... Args> constexpr T& emplace(Args&&...);
@@ -3311,8 +3311,8 @@
33113311
constexpr T& value() &; // freestanding-deleted
33123312
constexpr T&& value() &&; // freestanding-deleted
33133313
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&&) &&;
33163316

33173317
// \ref{optional.monadic}, monadic operations
33183318
template<class F> constexpr auto and_then(F&& f) &;
@@ -3504,7 +3504,7 @@
35043504

35053505
\indexlibraryctor{optional}%
35063506
\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);
35083508
\end{itemdecl}
35093509

35103510
\begin{itemdescr}
@@ -3756,7 +3756,7 @@
37563756

37573757
\indexlibrarymember{operator=}{optional}%
37583758
\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);
37603760
\end{itemdecl}
37613761

37623762
\begin{itemdescr}
@@ -4193,7 +4193,7 @@
41934193

41944194
\indexlibrarymember{value_or}{optional}%
41954195
\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 &;
41974197
\end{itemdecl}
41984198

41994199
\begin{itemdescr}
@@ -4211,7 +4211,7 @@
42114211

42124212
\indexlibrarymember{value_or}{optional}%
42134213
\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) &&;
42154215
\end{itemdecl}
42164216

42174217
\begin{itemdescr}
@@ -7440,7 +7440,7 @@
74407440
template<class U, class G>
74417441
constexpr explicit(@\seebelow@) expected(expected<U, G>&&);
74427442

7443-
template<class U = T>
7443+
template<class U = remove_cv_t<T>>
74447444
constexpr explicit(@\seebelow@) expected(U&& v);
74457445

74467446
template<class G>
@@ -7463,7 +7463,7 @@
74637463
// \ref{expected.object.assign}, assignment
74647464
constexpr expected& operator=(const expected&);
74657465
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&&);
74677467
template<class G>
74687468
constexpr expected& operator=(const unexpected<G>&);
74697469
template<class G>
@@ -7495,8 +7495,8 @@
74957495
constexpr E& error() & noexcept;
74967496
constexpr const E&& error() const && noexcept;
74977497
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&&) &&;
75007500
template<class G = E> constexpr E error_or(G&&) const &;
75017501
template<class G = E> constexpr E error_or(G&&) &&;
75027502

@@ -7747,7 +7747,7 @@
77477747

77487748
\indexlibraryctor{expected}%
77497749
\begin{itemdecl}
7750-
template<class U = T>
7750+
template<class U = remove_cv_t<T>>
77517751
constexpr explicit(!is_convertible_v<U, T>) expected(U&& v);
77527752
\end{itemdecl}
77537753

@@ -8066,7 +8066,7 @@
80668066

80678067
\indexlibrarymember{operator=}{expected}%
80688068
\begin{itemdecl}
8069-
template<class U = T>
8069+
template<class U = remove_cv_t<T>>
80708070
constexpr expected& operator=(U&& v);
80718071
\end{itemdecl}
80728072

@@ -8434,7 +8434,7 @@
84348434

84358435
\indexlibrarymember{value_or}{expected}%
84368436
\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 &;
84388438
\end{itemdecl}
84398439

84408440
\begin{itemdescr}
@@ -8450,7 +8450,7 @@
84508450

84518451
\indexlibrarymember{value_or}{expected}%
84528452
\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) &&;
84548454
\end{itemdecl}
84558455

84568456
\begin{itemdescr}

0 commit comments

Comments
 (0)