beman::optional::optional::and_then

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

Synopses

Declared in <beman/optional/optional.hpp>

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

template<class F>
constexpr
auto
and_then(F&& f) &;
» more...

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

template<class F>
constexpr
auto
and_then(F&& f) &&;
» more...

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

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

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

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

Return Value

auto

Template Parameters

Name Description
F The type of the invocable

Parameters

Name Description
f The invocable to apply to the contained value

Created with MrDocs