[#beman-optional-optional-03-or_else-04]
= xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-03.adoc[optional]::or&lowbar;else
:relfileprefix: ../../../
:mrdocs:

Returns an optional containing the stored value if it has one, or the result of applying `f` to the optional if it does not&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class F&gt;
constexpr
xref:beman/optional/optional-03.adoc[optional&lt;T&gt;]
or&lowbar;else(F&& f) &amp;&amp;;
----

== Return Value

* auto
* optional&lt;T&gt;

== Template Parameters

[cols=2]
|===
| Name
| Description
| *F*
| 
| *T*
| 
|===

== Parameters

[cols=2]
|===
| Name
| Description
| *f*
| 
|===


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