Skip to content

Commit f4a2ec3

Browse files
committed
[optional.monadic] Replace value() with **this
1 parent b4166d9 commit f4a2ec3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

source/utilities.tex

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4154,7 +4154,7 @@
41544154

41554155
\begin{itemdescr}
41564156
\pnum
4157-
Let \tcode{U} be \tcode{invoke_result_t<F, decltype(value())>}.
4157+
Let \tcode{U} be \tcode{invoke_result_t<F, decltype(**this)>}.
41584158

41594159
\pnum
41604160
\mandates
@@ -4165,7 +4165,7 @@
41654165
Equivalent to:
41664166
\begin{codeblock}
41674167
if (*this) {
4168-
return invoke(std::forward<F>(f), value());
4168+
return invoke(std::forward<F>(f), **this);
41694169
} else {
41704170
return remove_cvref_t<U>();
41714171
}
@@ -4180,7 +4180,7 @@
41804180

41814181
\begin{itemdescr}
41824182
\pnum
4183-
Let \tcode{U} be \tcode{invoke_result_t<F, decltype(std::move(value()))>}.
4183+
Let \tcode{U} be \tcode{invoke_result_t<F, decltype(std::move(**this))>}.
41844184

41854185
\pnum
41864186
\mandates
@@ -4191,7 +4191,7 @@
41914191
Equivalent to:
41924192
\begin{codeblock}
41934193
if (*this) {
4194-
return invoke(std::forward<F>(f), std::move(value()));
4194+
return invoke(std::forward<F>(f), std::move(**this));
41954195
} else {
41964196
return remove_cvref_t<U>();
41974197
}
@@ -4206,15 +4206,15 @@
42064206

42074207
\begin{itemdescr}
42084208
\pnum
4209-
Let \tcode{U} be \tcode{remove_cv_t<invoke_result_t<F, decltype(value())>>}.
4209+
Let \tcode{U} be \tcode{remove_cv_t<invoke_result_t<F, decltype(**this)>>}.
42104210

42114211
\pnum
42124212
\mandates
42134213
\tcode{U} is a non-array object type
42144214
other than \tcode{in_place_t} or \tcode{nullopt_t}.
42154215
The declaration
42164216
\begin{codeblock}
4217-
U u(invoke(std::forward<F>(f), value()));
4217+
U u(invoke(std::forward<F>(f), **this));
42184218
\end{codeblock}
42194219
is well-formed for some invented variable \tcode{u}.
42204220
\begin{note}
@@ -4225,7 +4225,7 @@
42254225
\returns
42264226
If \tcode{*this} contains a value, an \tcode{optional<U>} object
42274227
whose contained value is direct-non-list-initialized with
4228-
\tcode{invoke(std::forward<F>(f), value())};
4228+
\tcode{invoke(std::forward<F>(f), **this)};
42294229
otherwise, \tcode{optional<U>()}.
42304230
\end{itemdescr}
42314231

@@ -4238,15 +4238,15 @@
42384238
\begin{itemdescr}
42394239
\pnum
42404240
Let \tcode{U} be
4241-
\tcode{remove_cv_t<invoke_result_t<F, decltype(std::move(value()))>>}.
4241+
\tcode{remove_cv_t<invoke_result_t<F, decltype(std::move(**this))>>}.
42424242

42434243
\pnum
42444244
\mandates
42454245
\tcode{U} is a non-array object type
42464246
other than \tcode{in_place_t} or \tcode{nullopt_t}.
42474247
The declaration
42484248
\begin{codeblock}
4249-
U u(invoke(std::forward<F>(f), std::move(value())));
4249+
U u(invoke(std::forward<F>(f), std::move(**this)));
42504250
\end{codeblock}
42514251
is well-formed for some invented variable \tcode{u}.
42524252
\begin{note}
@@ -4257,7 +4257,7 @@
42574257
\returns
42584258
If \tcode{*this} contains a value, an \tcode{optional<U>} object
42594259
whose contained value is direct-non-list-initialized with
4260-
\tcode{invoke(std::forward<F>(f), std::move(value()))};
4260+
\tcode{invoke(std::forward<F>(f), std::move(**this))};
42614261
otherwise, \tcode{optional<U>()}.
42624262
\end{itemdescr}
42634263

0 commit comments

Comments
 (0)