Return the contained value, or value if this object is null.
Declared in <bdlb_nullablevalue.h>
TYPE
valueOr(TYPE const& value) const;
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.
the contained value if non-null, and the specified value otherwise
| Name | Description |
|---|---|
| value | fallback value returned when this object is null |