Skip to content

Commit 397a5a6

Browse files
jensmaurertkoeppe
authored andcommitted
[optional.monadic] Replace *val with **this
1 parent 25a2699 commit 397a5a6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

source/utilities.tex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4171,7 +4171,7 @@
41714171
Equivalent to:
41724172
\begin{codeblock}
41734173
if (*this) {
4174-
return invoke(std::forward<F>(f), *val);
4174+
return invoke(std::forward<F>(f), **this);
41754175
} else {
41764176
return remove_cvref_t<U>();
41774177
}
@@ -4186,7 +4186,7 @@
41864186

41874187
\begin{itemdescr}
41884188
\pnum
4189-
Let \tcode{U} be \tcode{invoke_result_t<F, decltype(std::move(*val))>}.
4189+
Let \tcode{U} be \tcode{invoke_result_t<F, decltype(std::move(**this))>}.
41904190

41914191
\pnum
41924192
\mandates
@@ -4197,7 +4197,7 @@
41974197
Equivalent to:
41984198
\begin{codeblock}
41994199
if (*this) {
4200-
return invoke(std::forward<F>(f), std::move(*val));
4200+
return invoke(std::forward<F>(f), std::move(**this));
42014201
} else {
42024202
return remove_cvref_t<U>();
42034203
}
@@ -4212,15 +4212,15 @@
42124212

42134213
\begin{itemdescr}
42144214
\pnum
4215-
Let \tcode{U} be \tcode{remove_cv_t<invoke_result_t<F, decltype(*val)>>}.
4215+
Let \tcode{U} be \tcode{remove_cv_t<invoke_result_t<F, decltype(**this)>>}.
42164216

42174217
\pnum
42184218
\mandates
42194219
\tcode{U} is a non-array object type
42204220
other than \tcode{in_place_t} or \tcode{nullopt_t}.
42214221
The declaration
42224222
\begin{codeblock}
4223-
U u(invoke(std::forward<F>(f), *val));
4223+
U u(invoke(std::forward<F>(f), **this));
42244224
\end{codeblock}
42254225
is well-formed for some invented variable \tcode{u}.
42264226
\begin{note}
@@ -4231,7 +4231,7 @@
42314231
\returns
42324232
If \tcode{*this} contains a value, an \tcode{optional<U>} object
42334233
whose contained value is direct-non-list-initialized with
4234-
\tcode{invoke(std::forward<F>(f), *val)};
4234+
\tcode{invoke(std::forward<F>(f), **this)};
42354235
otherwise, \tcode{optional<U>()}.
42364236
\end{itemdescr}
42374237

@@ -4244,15 +4244,15 @@
42444244
\begin{itemdescr}
42454245
\pnum
42464246
Let \tcode{U} be
4247-
\tcode{remove_cv_t<invoke_result_t<F, decltype(std::move(*val))>>}.
4247+
\tcode{remove_cv_t<invoke_result_t<F, decltype(std::move(**this))>>}.
42484248

42494249
\pnum
42504250
\mandates
42514251
\tcode{U} is a non-array object type
42524252
other than \tcode{in_place_t} or \tcode{nullopt_t}.
42534253
The declaration
42544254
\begin{codeblock}
4255-
U u(invoke(std::forward<F>(f), std::move(*val)));
4255+
U u(invoke(std::forward<F>(f), std::move(**this)));
42564256
\end{codeblock}
42574257
is well-formed for some invented variable \tcode{u}.
42584258
\begin{note}
@@ -4263,7 +4263,7 @@
42634263
\returns
42644264
If \tcode{*this} contains a value, an \tcode{optional<U>} object
42654265
whose contained value is direct-non-list-initialized with
4266-
\tcode{invoke(std::forward<F>(f), std::move(*val))};
4266+
\tcode{invoke(std::forward<F>(f), std::move(**this))};
42674267
otherwise, \tcode{optional<U>()}.
42684268
\end{itemdescr}
42694269

0 commit comments

Comments
 (0)