Applies a function to the stored value if there is one.

Synopsis

Declared in <beman/optional/optional.hpp>

template<class F>
constexpr
auto
and_then(F&& f) const;

Description

The return type is the same as

{std::invoke_result_t<F, T&>},
 but wrapped in an optional. The function \p f must return an optional type.

Return Value

auto

Created with MrDocs