mrdocs::Expected::transform

transform overloads

Synopses

Map the contained value, propagate error.

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

Map the contained value (const overload), propagate error.

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

Map the contained value (rvalue), propagate error.

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

Map the contained value (const rvalue), propagate error.

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

Return Value

Expected holding the mapped value or the original error.

Parameters

Name Description

f

Mapping function applied to the value.

Created with MrDocs