[#BloombergLP-bdlb-NullableValue-valueOr-0e] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue]::valueOr :relfileprefix: ../../../ :mrdocs: Return the contained value, or `value` if this object is null. == Synopsis Declared in `<bdlb_nullablevalue.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- TYPE valueOr(TYPE const& value) const; ---- == Description Return the value of the underlying object of a (template parameter) `TYPE` if this object is non‐null, and the specified `value` otherwise. Note that this method returns _by_ _value_, so may be inefficient in some contexts. == Return Value the contained value if non‐null, and the specified `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]#