[#BloombergLP-bdlb-NullableValue-valueOr-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue]::valueOr
:relfileprefix: ../../../
:mrdocs:

`valueOr` overloads

== Synopses

Declared in `&lt;bdlb&lowbar;nullablevalue&period;h&gt;`

Return the contained value, or `value` if this object is null&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
TYPE
xref:BloombergLP/bdlb/NullableValue/valueOr-0e.adoc[valueOr](TYPE const& value) const;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/valueOr-0e.adoc[_» more&period;&period;&period;_]#

Return the address of the contained value, or `value` if null&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
TYPE const*
xref:BloombergLP/bdlb/NullableValue/valueOr-09.adoc[valueOr](TYPE const* value) const;
----

[.small]#xref:BloombergLP/bdlb/NullableValue/valueOr-09.adoc[_» more&period;&period;&period;_]#

== Return Value

* the contained value if non&hyphen;null, and the specified `value` otherwise
* address of the underlying object if non&hyphen;null, and `value` otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| fallback value returned when this object is null
|===


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