[#BloombergLP-bdlb-ConstNullableValueRef] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::ConstNullableValueRef :relfileprefix: ../../ :mrdocs: This class is a wrapper for either a `bsl::optional` or `NullableAllocatedValue`, and provides non‐modifiable access to the wrapped object. == Synopsis Declared in `<bdlb_nullablevalueref.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> class ConstNullableValueRef; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/ConstNullableValueRef/value_type.adoc[`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. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/ConstNullableValueRef/2constructor-05.adoc[`ConstNullableValueRef`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlb/ConstNullableValueRef/addressOr.adoc[`addressOr`] | Return the address of the value, or `address` if null. | xref:BloombergLP/bdlb/ConstNullableValueRef/has_value.adoc[`has_value`] | Return `true` if the target contains a value, and `false` otherwise. | xref:BloombergLP/bdlb/ConstNullableValueRef/isNull.adoc[`isNull`] | Return whether the target does not contain a value. | xref:BloombergLP/bdlb/ConstNullableValueRef/operator_star.adoc[`operator*`] | Return a reference providing non‐modifiable access to the underlying `TYPE` object. The behavior is undefined if the target has no value. | xref:BloombergLP/bdlb/ConstNullableValueRef/operator_ptr.adoc[`operator‐>`] | Return a pointer providing non‐modifiable access to the underlying `TYPE` object. The behavior is undefined if the target has no value. | xref:BloombergLP/bdlb/ConstNullableValueRef/value.adoc[`value`] | Return a non‐modifiable reference to the underlying value. | xref:BloombergLP/bdlb/ConstNullableValueRef/valueOr.adoc[`valueOr`] | Return the underlying value, or `otherValue` if null. | xref:BloombergLP/bdlb/ConstNullableValueRef/valueOrNull.adoc[`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. | xref:BloombergLP/bdlb/ConstNullableValueRef/value_or.adoc[`value_or`] | Return the underlying value, or `default_value` if null. | xref:BloombergLP/bdlb/ConstNullableValueRef/2conversion.adoc[`operator bool`] | Return `true` if the target holds a value, and `false` otherwise. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/operator_not_eq-001.adoc[`operator!=`] | Return whether `lhs` and `rhs` do not have the same value. | xref:BloombergLP/bdlb/operator_not_eq-051.adoc[`operator!=`] | Return whether `lhs` and `rhs` do not have the same value. | xref:BloombergLP/bdlb/operator_not_eq-0c0.adoc[`operator!=`] | Return whether `lhs` is not null. | xref:BloombergLP/bdlb/operator_not_eq-0eb.adoc[`operator!=`] | Return whether `lhs` and `rhs` do not have the same value. | xref:BloombergLP/bdlb/operator_lt-033.adoc[`operator<`] | Return whether `lhs` is ordered before `rhs`. | xref:BloombergLP/bdlb/operator_lt-054c.adoc[`operator<`] | Return `false`; nullopt never orders after a nullable reference. | xref:BloombergLP/bdlb/operator_lt-0f9.adoc[`operator<`] | Return whether `lhs` is ordered before `rhs`. | xref:BloombergLP/bdlb/operator_lt-0fe.adoc[`operator<`] | Return whether `lhs` is ordered before `rhs`. | xref:BloombergLP/bdlb/operator_le-054.adoc[`operator<=`] | Return whether `lhs` is ordered before `rhs` or they are equal. | xref:BloombergLP/bdlb/operator_le-0b.adoc[`operator<=`] | Return whether `lhs` is ordered before `rhs` or they are equal. | xref:BloombergLP/bdlb/operator_le-0d.adoc[`operator<=`] | Return whether `lhs` is null. | xref:BloombergLP/bdlb/operator_le-0f6.adoc[`operator<=`] | Return whether `lhs` is ordered before `rhs` or they are equal. | xref:BloombergLP/bdlb/operator_eq-003.adoc[`operator==`] | Return whether `lhs` and `rhs` have the same value. | xref:BloombergLP/bdlb/operator_eq-01c.adoc[`operator==`] | Return whether `lhs` and `rhs` have the same value. | xref:BloombergLP/bdlb/operator_eq-03cc.adoc[`operator==`] | Return whether `lhs` is null. | xref:BloombergLP/bdlb/operator_eq-04f.adoc[`operator==`] | Return whether `lhs` and `rhs` have the same value. | xref:BloombergLP/bdlb/operator_gt-02.adoc[`operator>`] | Return whether `lhs` is not null. | xref:BloombergLP/bdlb/operator_gt-04f.adoc[`operator>`] | Return whether `lhs` is ordered after `rhs`. | xref:BloombergLP/bdlb/operator_gt-098.adoc[`operator>`] | Return whether `lhs` is ordered after `rhs`. | xref:BloombergLP/bdlb/operator_gt-0b0.adoc[`operator>`] | Return whether `lhs` is ordered after `rhs`. | xref:BloombergLP/bdlb/operator_ge-008.adoc[`operator>=`] | Return `true`. | xref:BloombergLP/bdlb/operator_ge-035.adoc[`operator>=`] | Return whether `lhs` is ordered after `rhs` or they are equal. | xref:BloombergLP/bdlb/operator_ge-09f9.adoc[`operator>=`] | Return whether `lhs` is ordered after `rhs` or they are equal. | xref:BloombergLP/bdlb/operator_ge-0a.adoc[`operator>=`] | Return whether `lhs` is ordered after `rhs` or they are equal. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#