| 727 | std::enable_if_t<!std::is_same<U, dlib::nullopt_t>::value, bool> = true |
| 728 | > |
| 729 | constexpr dlib::optional<U> transform(F&& f) & |
| 730 | { |
| 731 | if (*this) |
| 732 | return dlib::invoke(std::forward<F>(f), **this); |
| 733 | else |
| 734 | return dlib::optional<U>{}; |
| 735 | } |
| 736 | |
| 737 | template < |
| 738 | class F, |