Returns a reference to the stored value.

Synopsis

Declared in <beman/optional/optional.hpp>

template<class U = std::remove_cv_t<T>>
constexpr
T
value_or(U&& u);

Description

Returns the stored value if there is one, otherwise returns u

Return Value

T

Template Parameters

Name

Description

U

Parameters

Name

Description

u

Created with MrDocs