mrdocs::Expected::value_or

value_or overloads

Synopses

Return the contained value or a fallback copy.

template<class U>
constexpr
T
value_or(U&& v) const & noexcept(std::is_nothrow_copy_constructible_v<T> && std::is_nothrow_convertible_v<U, T>);

Return the contained value or a fallback move.

template<class U>
constexpr
T
value_or(U&& v) && noexcept(std::is_nothrow_move_constructible_v<T> && std::is_nothrow_convertible_v<U, T>);

Return Value

Contained value or the fallback converted to T.

Parameters

Name Description

v

Fallback value to use when disengaged.

Created with MrDocs