|
4154 | 4154 |
|
4155 | 4155 | \begin{itemdescr}
|
4156 | 4156 | \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)>}. |
4158 | 4158 |
|
4159 | 4159 | \pnum
|
4160 | 4160 | \mandates
|
|
4165 | 4165 | Equivalent to:
|
4166 | 4166 | \begin{codeblock}
|
4167 | 4167 | if (*this) {
|
4168 |
| - return invoke(std::forward<F>(f), value()); |
| 4168 | + return invoke(std::forward<F>(f), **this); |
4169 | 4169 | } else {
|
4170 | 4170 | return remove_cvref_t<U>();
|
4171 | 4171 | }
|
|
4180 | 4180 |
|
4181 | 4181 | \begin{itemdescr}
|
4182 | 4182 | \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))>}. |
4184 | 4184 |
|
4185 | 4185 | \pnum
|
4186 | 4186 | \mandates
|
|
4191 | 4191 | Equivalent to:
|
4192 | 4192 | \begin{codeblock}
|
4193 | 4193 | if (*this) {
|
4194 |
| - return invoke(std::forward<F>(f), std::move(value())); |
| 4194 | + return invoke(std::forward<F>(f), std::move(**this)); |
4195 | 4195 | } else {
|
4196 | 4196 | return remove_cvref_t<U>();
|
4197 | 4197 | }
|
|
4206 | 4206 |
|
4207 | 4207 | \begin{itemdescr}
|
4208 | 4208 | \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)>>}. |
4210 | 4210 |
|
4211 | 4211 | \pnum
|
4212 | 4212 | \mandates
|
4213 | 4213 | \tcode{U} is a non-array object type
|
4214 | 4214 | other than \tcode{in_place_t} or \tcode{nullopt_t}.
|
4215 | 4215 | The declaration
|
4216 | 4216 | \begin{codeblock}
|
4217 |
| -U u(invoke(std::forward<F>(f), value())); |
| 4217 | +U u(invoke(std::forward<F>(f), **this)); |
4218 | 4218 | \end{codeblock}
|
4219 | 4219 | is well-formed for some invented variable \tcode{u}.
|
4220 | 4220 | \begin{note}
|
|
4225 | 4225 | \returns
|
4226 | 4226 | If \tcode{*this} contains a value, an \tcode{optional<U>} object
|
4227 | 4227 | 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)}; |
4229 | 4229 | otherwise, \tcode{optional<U>()}.
|
4230 | 4230 | \end{itemdescr}
|
4231 | 4231 |
|
|
4238 | 4238 | \begin{itemdescr}
|
4239 | 4239 | \pnum
|
4240 | 4240 | 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))>>}. |
4242 | 4242 |
|
4243 | 4243 | \pnum
|
4244 | 4244 | \mandates
|
4245 | 4245 | \tcode{U} is a non-array object type
|
4246 | 4246 | other than \tcode{in_place_t} or \tcode{nullopt_t}.
|
4247 | 4247 | The declaration
|
4248 | 4248 | \begin{codeblock}
|
4249 |
| -U u(invoke(std::forward<F>(f), std::move(value()))); |
| 4249 | +U u(invoke(std::forward<F>(f), std::move(**this))); |
4250 | 4250 | \end{codeblock}
|
4251 | 4251 | is well-formed for some invented variable \tcode{u}.
|
4252 | 4252 | \begin{note}
|
|
4257 | 4257 | \returns
|
4258 | 4258 | If \tcode{*this} contains a value, an \tcode{optional<U>} object
|
4259 | 4259 | 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))}; |
4261 | 4261 | otherwise, \tcode{optional<U>()}.
|
4262 | 4262 | \end{itemdescr}
|
4263 | 4263 |
|
|
0 commit comments