mrdocs::Expected::and_then

and_then overloads

Synopses

Invoke f when engaged, propagate error otherwise.

template<class Fn>
requires std::is_constructible_v<E, E&>
constexpr
auto
and_then(Fn&& f) &;

Invoke f when engaged (const lvalue), propagate error otherwise.

template<class Fn>
requires std::is_constructible_v<E, E const&>
constexpr
auto
and_then(Fn&& f) const &;

Invoke f when engaged (rvalue), propagate error otherwise.

template<class Fn>
requires std::is_constructible_v<E, E>
constexpr
auto
and_then(Fn&& f) &&;

Invoke f when engaged (const rvalue), propagate error otherwise.

template<class Fn>
requires std::is_constructible_v<E, const E>
constexpr
auto
and_then(Fn&& f) const &&;

Return Value

Result of f or this error.

Parameters

Name Description

f

Continuation that returns another Expected.

Created with MrDocs