mrdocs::Expected::transform_error

Map the contained error (const lvalue), preserve value.

Synopsis

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

Return Value

Expected holding the original value or mapped error.

Parameters

Name

Description

f

Mapping function applied to the error.

Created with MrDocs