Applies a function to the contained value if there is one.
Synopsis
Declared in <beman/optional/optional.hpp>
template<class F>
constexpr
optional<std::invoke_result_t<F, T&>>
transform(F&& f) const;
Applies a function to the contained value if there is one.
Declared in <beman/optional/optional.hpp>
template<class F>
constexpr
optional<std::invoke_result_t<F, T&>>
transform(F&& f) const;