mrdocs::Expected::or_else
or_else overloads
Synopses
Declared in <mrdocs/Support/Expected.hpp>
Invoke f when in error, otherwise return current value.
template<class Fn>
requires std::is_constructible_v<T, T&>
constexpr
auto
or_else(Fn&& f) &;
Invoke f when in error (const lvalue).
template<class Fn>
requires std::is_constructible_v<T, T const&>
constexpr
auto
or_else(Fn&& f) const &;
Invoke f when in error (rvalue).
template<class Fn>
requires std::is_constructible_v<T, T>
constexpr
auto
or_else(Fn&& f) &&;
Invoke f when in error (const rvalue).
template<class Fn>
requires std::is_constructible_v<T, const T>
constexpr
auto
or_else(Fn&& f) const &&;
Parameters
| Name | Description |
|---|---|
f |
Recovery function returning an Expected. |
Created with MrDocs