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