[#BloombergLP-bdlb-NullableAllocatedValue-valueOr] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/NullableAllocatedValue.adoc[NullableAllocatedValue]::valueOr :relfileprefix: ../../../ :mrdocs: Return the value of the underlying object of a (template parameter) `TYPE` if this object is non‐null, and the specified `otherValue` otherwise. Note that this method returns _by_ _value_, so may be inefficient in some contexts. == Synopsis Declared in `<bdlb_nullableallocatedvalue.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- TYPE valueOr(TYPE const& otherValue) const; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#