[#BloombergLP-bdlb-NullableValueRef] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::NullableValueRef :relfileprefix: ../../ :mrdocs: This class is a wrapper for either a `bsl::optional` or `NullableAllocatedValue`, and provides modifiable access to the wrapped object. == Synopsis Declared in `<bdlb_nullablevalueref.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> class NullableValueRef; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/NullableValueRef/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/NullableValueRef/2constructor-0d8.adoc[`NullableValueRef`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlb/NullableValueRef/operator_assign-08.adoc[`operator=`] | Assignment operators | xref:BloombergLP/bdlb/NullableValueRef/addressOr.adoc[`addressOr`] | Return the address of the value, or `address` if null. | xref:BloombergLP/bdlb/NullableValueRef/emplace.adoc[`emplace`] | Emplace a value constructed from `args` into the target. | xref:BloombergLP/bdlb/NullableValueRef/has_value.adoc[`has_value`] | Return `true` if the target contains a value, and `false` otherwise. | xref:BloombergLP/bdlb/NullableValueRef/isNull.adoc[`isNull`] | Return whether the target does not contain a value. | xref:BloombergLP/bdlb/NullableValueRef/makeValueInplace.adoc[`makeValueInplace`] | Construct a value in place from `args` and return it. | xref:BloombergLP/bdlb/NullableValueRef/operator_star-08e.adoc[`operator*`] | Dereference operators | xref:BloombergLP/bdlb/NullableValueRef/operator_ptr-0a.adoc[`operator‐>`] | Member access operators | xref:BloombergLP/bdlb/NullableValueRef/reset.adoc[`reset`] | Reset the target to the default constructed state (i.e., to have the null value). | xref:BloombergLP/bdlb/NullableValueRef/value-04.adoc[`value`] | `value` overloads | xref:BloombergLP/bdlb/NullableValueRef/valueOr.adoc[`valueOr`] | Return the underlying value, or `otherValue` if null. | xref:BloombergLP/bdlb/NullableValueRef/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/NullableValueRef/value_or.adoc[`value_or`] | Return the underlying value, or `default_value` if null. | xref:BloombergLP/bdlb/NullableValueRef/2conversion.adoc[`operator bool`] | Return `true` if the target holds a value, and `false` otherwise. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlb/ConstNullableValueRef.adoc[BloombergLP::bdlb::ConstNullableValueRef]` | This class is a wrapper for either a `bsl::optional` or `NullableAllocatedValue`, and provides non‐modifiable access to the wrapped object. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/operator_not_eq-00d.adoc[`operator!=`] | See the overload above for contract. | xref:BloombergLP/bdlb/operator_not_eq-00fa.adoc[`operator!=`] | Return whether `lhs` and `rhs` do not have the same value. | xref:BloombergLP/bdlb/operator_not_eq-076.adoc[`operator!=`] | Return whether the nullable reference is not null. | xref:BloombergLP/bdlb/operator_not_eq-0d.adoc[`operator!=`] | Return whether `lhs` and `rhs` do not have the same value. | xref:BloombergLP/bdlb/operator_lt-020.adoc[`operator<`] | Return `false`; nullopt never orders after a nullable reference. | xref:BloombergLP/bdlb/operator_lt-02f.adoc[`operator<`] | Return whether `lhs` is ordered before `rhs`. | xref:BloombergLP/bdlb/operator_lt-037.adoc[`operator<`] | Return whether `lhs` is ordered before `rhs`. | xref:BloombergLP/bdlb/operator_lt-0f0.adoc[`operator<`] | See the overload above for contract. | xref:BloombergLP/bdlb/operator_le-03f.adoc[`operator<=`] | Return whether `lhs` is ordered before `rhs` or they are equal. | xref:BloombergLP/bdlb/operator_le-07.adoc[`operator<=`] | See the overload above for contract. | xref:BloombergLP/bdlb/operator_le-0fd.adoc[`operator<=`] | Return whether `lhs` is ordered before `rhs` or they are equal. | xref:BloombergLP/bdlb/operator_le-0ff.adoc[`operator<=`] | Return whether `lhs` is null. | xref:BloombergLP/bdlb/operator_eq-013ae.adoc[`operator==`] | Return whether `lhs` is null. | xref:BloombergLP/bdlb/operator_eq-06d.adoc[`operator==`] | See the overload above for contract. | xref:BloombergLP/bdlb/operator_eq-07f.adoc[`operator==`] | Return whether `lhs` and `rhs` have the same value. | xref:BloombergLP/bdlb/operator_eq-0a9.adoc[`operator==`] | Return whether `lhs` and `rhs` have the same value. | xref:BloombergLP/bdlb/operator_gt-0110.adoc[`operator>`] | See the overload above for contract. | xref:BloombergLP/bdlb/operator_gt-0c5e.adoc[`operator>`] | Return whether `lhs` is ordered after `rhs`. | xref:BloombergLP/bdlb/operator_gt-0e.adoc[`operator>`] | Return whether `lhs` is ordered after `rhs`. | xref:BloombergLP/bdlb/operator_gt-0f5.adoc[`operator>`] | Return whether `lhs` is not null. | xref:BloombergLP/bdlb/operator_ge-037.adoc[`operator>=`] | Return whether `lhs` is ordered after `rhs` or they are equal. | xref:BloombergLP/bdlb/operator_ge-03d.adoc[`operator>=`] | See the overload above for contract. | xref:BloombergLP/bdlb/operator_ge-05d.adoc[`operator>=`] | Return whether `lhs` is ordered after `rhs` or they are equal. | xref:BloombergLP/bdlb/operator_ge-0e.adoc[`operator>=`] | Return `true`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#