member function template
std::optional<T&>::value_or
- Header
<optional>also in<algorithm>,<exception>,<execution>,<flat_map>,<functional>and 8 more- Draft
- [optional.syn]
- Scope
std::optional<T&>- cppreference
- <optional> nearest page
Synopsis
template<class U = remove_cv_t<T>>
requires is_object_v<T> && (!is_array_v<T>)
constexpr /* implementation-defined */::type value_or(U&& u) const;