[#util-Expected-0b-value_or-0c]
= xref:util.adoc[util]::xref:util/Expected-0b.adoc[Expected]::value&lowbar;or
:relfileprefix: ../../
:mrdocs:

Return the result value, or a fallback when an error is held&period;

== Synopses

Declared in `&lt;util&sol;expected&period;h&gt;`

Return the result value, or a fallback when an error is held&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class U&gt;
T
xref:util/Expected-0b/value_or-0b.adoc[value&lowbar;or](U&& default&lowbar;value) const &amp;;
----

[.small]#xref:util/Expected-0b/value_or-0b.adoc[_» more&period;&period;&period;_]#

Return the result value, or a fallback when an error is held&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class U&gt;
T
xref:util/Expected-0b/value_or-08.adoc[value&lowbar;or](U&& default&lowbar;value) &amp;&amp;;
----

[.small]#xref:util/Expected-0b/value_or-08.adoc[_» more&period;&period;&period;_]#

== Return Value

The stored result value, or default&lowbar;value if an error is held&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *default&lowbar;value*
| The value returned when no result is stored&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
