BloombergLP::bdlb::NullableValue::valueOr

valueOr overloads

Synopses

Declared in <bdlb_nullablevalue.h>

Return the contained value, or value if this object is null.

TYPE
valueOr(TYPE const& value) const;
» more...

Return the address of the contained value, or value if null.

TYPE const*
valueOr(TYPE const* value) const;
» more...

Return Value

  • the contained value if non-null, and the specified value otherwise
  • address of the underlying object if non-null, and value otherwise

Parameters

NameDescription
valuefallback value returned when this object is null