[#beman-optional-optional-03-value_or-01] = xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-03.adoc[optional]::value_or :relfileprefix: ../../../ :mrdocs: Returns the contained 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) &&; ---- == Return Value T == Template Parameters [cols="1,4"] |=== |Name|Description | *U* | The type of the alternate value |=== == Parameters [cols="1,4"] |=== |Name|Description | *u* | The value to return in the empty case |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#