[#beman-optional-optional-03-value_or-0b5] = xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-03.adoc[optional]::value_or :relfileprefix: ../../../ :mrdocs: Returns a reference to the stored value. == Synopsis Declared in `<beman/optional/optional.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class U = std::remove_cv_t<T>> constexpr T value_or(U&& u) const &; ---- == Description Returns the stored value if there is one, otherwise returns `u` == Return Value T == Template Parameters [cols=2] |=== | Name | Description | *U* | |=== == Parameters [cols=2] |=== | Name | Description | *u* | |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#