[#absl-StatusOr-value_or-08]
= xref:absl.adoc[absl]::xref:absl/StatusOr.adoc[StatusOr]::value&lowbar;or
:relfileprefix: ../../
:mrdocs:

Returns the held value, or a default when no value is present (rvalue overload)&period;

== Synopsis

Declared in `&lt;absl&sol;status&sol;statusor&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename U&gt;
requires internal&lowbar;statusor&colon;&colon;IsValueOrValid&lt;T, U&amp;&amp;, false&gt;&colon;&colon;value
T
value&lowbar;or(U&& default&lowbar;value) &amp;&amp;;
----

== Return Value

The held value if present, otherwise `default&lowbar;value`&period;

== Parameters

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


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