valueOr overloads

Synopses

Declared in <bdlb_nullablevalue.h>

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.

TYPE
valueOr(TYPE const& value) const;

Return an address providing non‐modifiable access to the underlying object of a (template parameter) TYPE if this object is non‐null, and the specified value otherwise. DEPRECATED: Use addressOr instead.

TYPE const*
valueOr(TYPE const* value) const;

Created with MrDocs