[#beman-optional-optional-03-value_or-0b]
= xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-03.adoc[optional]::value&lowbar;or
:relfileprefix: ../../../
:mrdocs:

Returns the contained value if there is one, otherwise returns `u`&period;

== Synopsis

Declared in `&lt;beman&sol;optional&sol;optional&period;hpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class U = std::remove&lowbar;cv&lowbar;t&lt;T&gt;&gt;
constexpr
std::remove&lowbar;cv&lowbar;t&lt;T&gt;
value&lowbar;or(U&& u) &amp;&amp;;
----

== 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]#
