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) &;

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

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

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

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

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

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

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