| 399 | /// the stored error. |
| 400 | template <typename M> |
| 401 | typename EnsureResult<decltype(std::declval<M&&>()(std::declval<T&&>()))>::type Map( |
| 402 | M&& m) && { |
| 403 | if (!ok()) { |
| 404 | return std::move(*this).status(); |
| 405 | } |
| 406 | return std::forward<M>(m)(MoveValueUnsafe()); |
| 407 | } |
| 408 | |
| 409 | /// Apply a function to the internally stored value to produce a new result or propagate |
| 410 | /// the stored error. |