|
4172 | 4172 | Equivalent to:
|
4173 | 4173 | \begin{codeblock}
|
4174 | 4174 | if (*this) {
|
4175 |
| - return invoke(std::forward<F>(f), **this); |
| 4175 | + return invoke(std::forward<F>(f), *val); |
4176 | 4176 | } else {
|
4177 | 4177 | return remove_cvref_t<U>();
|
4178 | 4178 | }
|
|
4187 | 4187 |
|
4188 | 4188 | \begin{itemdescr}
|
4189 | 4189 | \pnum
|
4190 |
| -Let \tcode{U} be \tcode{invoke_result_t<F, decltype(std::move(**this))>}. |
| 4190 | +Let \tcode{U} be \tcode{invoke_result_t<F, decltype(std::move(*val))>}. |
4191 | 4191 |
|
4192 | 4192 | \pnum
|
4193 | 4193 | \mandates
|
|
4198 | 4198 | Equivalent to:
|
4199 | 4199 | \begin{codeblock}
|
4200 | 4200 | if (*this) {
|
4201 |
| - return invoke(std::forward<F>(f), std::move(**this)); |
| 4201 | + return invoke(std::forward<F>(f), std::move(*val)); |
4202 | 4202 | } else {
|
4203 | 4203 | return remove_cvref_t<U>();
|
4204 | 4204 | }
|
|
4213 | 4213 |
|
4214 | 4214 | \begin{itemdescr}
|
4215 | 4215 | \pnum
|
4216 |
| -Let \tcode{U} be \tcode{remove_cv_t<invoke_result_t<F, decltype(**this)>>}. |
| 4216 | +Let \tcode{U} be \tcode{remove_cv_t<invoke_result_t<F, decltype(*val)>>}. |
4217 | 4217 |
|
4218 | 4218 | \pnum
|
4219 | 4219 | \mandates
|
4220 | 4220 | \tcode{U} is a non-array object type
|
4221 | 4221 | other than \tcode{in_place_t} or \tcode{nullopt_t}.
|
4222 | 4222 | The declaration
|
4223 | 4223 | \begin{codeblock}
|
4224 |
| -U u(invoke(std::forward<F>(f), **this)); |
| 4224 | +U u(invoke(std::forward<F>(f), *val)); |
4225 | 4225 | \end{codeblock}
|
4226 | 4226 | is well-formed for some invented variable \tcode{u}.
|
4227 | 4227 | \begin{note}
|
|
4232 | 4232 | \returns
|
4233 | 4233 | If \tcode{*this} contains a value, an \tcode{optional<U>} object
|
4234 | 4234 | whose contained value is direct-non-list-initialized with
|
4235 |
| -\tcode{invoke(std::forward<F>(f), **this)}; |
| 4235 | +\tcode{invoke(std::forward<F>(f), *val)}; |
4236 | 4236 | otherwise, \tcode{optional<U>()}.
|
4237 | 4237 | \end{itemdescr}
|
4238 | 4238 |
|
|
4245 | 4245 | \begin{itemdescr}
|
4246 | 4246 | \pnum
|
4247 | 4247 | Let \tcode{U} be
|
4248 |
| -\tcode{remove_cv_t<invoke_result_t<F, decltype(std::move(**this))>>}. |
| 4248 | +\tcode{remove_cv_t<invoke_result_t<F, decltype(std::move(*val))>>}. |
4249 | 4249 |
|
4250 | 4250 | \pnum
|
4251 | 4251 | \mandates
|
4252 | 4252 | \tcode{U} is a non-array object type
|
4253 | 4253 | other than \tcode{in_place_t} or \tcode{nullopt_t}.
|
4254 | 4254 | The declaration
|
4255 | 4255 | \begin{codeblock}
|
4256 |
| -U u(invoke(std::forward<F>(f), std::move(**this))); |
| 4256 | +U u(invoke(std::forward<F>(f), std::move(*val))); |
4257 | 4257 | \end{codeblock}
|
4258 | 4258 | is well-formed for some invented variable \tcode{u}.
|
4259 | 4259 | \begin{note}
|
|
4264 | 4264 | \returns
|
4265 | 4265 | If \tcode{*this} contains a value, an \tcode{optional<U>} object
|
4266 | 4266 | whose contained value is direct-non-list-initialized with
|
4267 |
| -\tcode{invoke(std::forward<F>(f), std::move(**this))}; |
| 4267 | +\tcode{invoke(std::forward<F>(f), std::move(*val))}; |
4268 | 4268 | otherwise, \tcode{optional<U>()}.
|
4269 | 4269 | \end{itemdescr}
|
4270 | 4270 |
|
|
0 commit comments