|
4171 | 4171 | Equivalent to:
|
4172 | 4172 | \begin{codeblock}
|
4173 | 4173 | if (*this) {
|
4174 |
| - return invoke(std::forward<F>(f), *val); |
| 4174 | + return invoke(std::forward<F>(f), **this); |
4175 | 4175 | } else {
|
4176 | 4176 | return remove_cvref_t<U>();
|
4177 | 4177 | }
|
|
4186 | 4186 |
|
4187 | 4187 | \begin{itemdescr}
|
4188 | 4188 | \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))>}. |
4190 | 4190 |
|
4191 | 4191 | \pnum
|
4192 | 4192 | \mandates
|
|
4197 | 4197 | Equivalent to:
|
4198 | 4198 | \begin{codeblock}
|
4199 | 4199 | if (*this) {
|
4200 |
| - return invoke(std::forward<F>(f), std::move(*val)); |
| 4200 | + return invoke(std::forward<F>(f), std::move(**this)); |
4201 | 4201 | } else {
|
4202 | 4202 | return remove_cvref_t<U>();
|
4203 | 4203 | }
|
|
4212 | 4212 |
|
4213 | 4213 | \begin{itemdescr}
|
4214 | 4214 | \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)>>}. |
4216 | 4216 |
|
4217 | 4217 | \pnum
|
4218 | 4218 | \mandates
|
4219 | 4219 | \tcode{U} is a non-array object type
|
4220 | 4220 | other than \tcode{in_place_t} or \tcode{nullopt_t}.
|
4221 | 4221 | The declaration
|
4222 | 4222 | \begin{codeblock}
|
4223 |
| -U u(invoke(std::forward<F>(f), *val)); |
| 4223 | +U u(invoke(std::forward<F>(f), **this)); |
4224 | 4224 | \end{codeblock}
|
4225 | 4225 | is well-formed for some invented variable \tcode{u}.
|
4226 | 4226 | \begin{note}
|
|
4231 | 4231 | \returns
|
4232 | 4232 | If \tcode{*this} contains a value, an \tcode{optional<U>} object
|
4233 | 4233 | 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)}; |
4235 | 4235 | otherwise, \tcode{optional<U>()}.
|
4236 | 4236 | \end{itemdescr}
|
4237 | 4237 |
|
|
4244 | 4244 | \begin{itemdescr}
|
4245 | 4245 | \pnum
|
4246 | 4246 | 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))>>}. |
4248 | 4248 |
|
4249 | 4249 | \pnum
|
4250 | 4250 | \mandates
|
4251 | 4251 | \tcode{U} is a non-array object type
|
4252 | 4252 | other than \tcode{in_place_t} or \tcode{nullopt_t}.
|
4253 | 4253 | The declaration
|
4254 | 4254 | \begin{codeblock}
|
4255 |
| -U u(invoke(std::forward<F>(f), std::move(*val))); |
| 4255 | +U u(invoke(std::forward<F>(f), std::move(**this))); |
4256 | 4256 | \end{codeblock}
|
4257 | 4257 | is well-formed for some invented variable \tcode{u}.
|
4258 | 4258 | \begin{note}
|
|
4263 | 4263 | \returns
|
4264 | 4264 | If \tcode{*this} contains a value, an \tcode{optional<U>} object
|
4265 | 4265 | 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))}; |
4267 | 4267 | otherwise, \tcode{optional<U>()}.
|
4268 | 4268 | \end{itemdescr}
|
4269 | 4269 |
|
|
0 commit comments