This class is a wrapper for either a bsl::optional or NullableAllocatedValue, and provides non-modifiable access to the wrapped object.
Declared in <bdlb_nullablevalueref.h>
template<class TYPE>
class ConstNullableValueRef;
| Name | Description |
|---|---|
value_type | value_type is an alias for the template parameter TYPE, and represents the type of the object managed by the wrapped nullable object. |
| Name | Description |
|---|---|
ConstNullableValueRef [constructor] | Constructors |
addressOr | Return the address of the value, or address if null. |
has_value | Return true if the target contains a value, and false otherwise. |
isNull | Return whether the target does not contain a value. |
operator* | Return a reference providing non-modifiable access to the underlying TYPE object. The behavior is undefined if the target has no value. |
operator-> | Return a pointer providing non-modifiable access to the underlying TYPE object. The behavior is undefined if the target has no value. |
value | Return a non-modifiable reference to the underlying value. |
valueOr | Return the underlying value, or otherValue if null. |
valueOrNull | Return an address providing non-modifiable access to the underlying object of a (template parameter) TYPE if this object is non-null, and 0 otherwise. |
value_or | Return the underlying value, or default_value if null. |
operator bool | Return true if the target holds a value, and false otherwise. |
| Name | Description |
|---|---|
operator!= | Return whether lhs and rhs do not have the same value. |
operator!= | Return whether lhs and rhs do not have the same value. |
operator!= | Return whether lhs is not null. |
operator!= | Return whether lhs and rhs do not have the same value. |
operator< | Return whether lhs is ordered before rhs. |
operator< | Return false; nullopt never orders after a nullable reference. |
operator< | Return whether lhs is ordered before rhs. |
operator< | Return whether lhs is ordered before rhs. |
operator<= | Return whether lhs is ordered before rhs or they are equal. |
operator<= | Return whether lhs is ordered before rhs or they are equal. |
operator<= | Return whether lhs is null. |
operator<= | Return whether lhs is ordered before rhs or they are equal. |
operator== | Return whether lhs and rhs have the same value. |
operator== | Return whether lhs and rhs have the same value. |
operator== | Return whether lhs is null. |
operator== | Return whether lhs and rhs have the same value. |
operator> | Return whether lhs is not null. |
operator> | Return whether lhs is ordered after rhs. |
operator> | Return whether lhs is ordered after rhs. |
operator> | Return whether lhs is ordered after rhs. |
operator>= | Return true. |
operator>= | Return whether lhs is ordered after rhs or they are equal. |
operator>= | Return whether lhs is ordered after rhs or they are equal. |
operator>= | Return whether lhs is ordered after rhs or they are equal. |