[#BloombergLP-bdlb-NullableValueRef]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::NullableValueRef
:relfileprefix: ../../
:mrdocs:

This class is a wrapper for either a `bsl&colon;&colon;optional` or `NullableAllocatedValue`, and provides modifiable access to the wrapped object&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;nullablevalueref&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
class NullableValueRef;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/NullableValueRef/value_type.adoc[`value&lowbar;type`] 
| `value&lowbar;type` is an alias for the template parameter `TYPE`, and represents the type of the object managed by the wrapped nullable object&period;
|===


== 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&equals;`] 
| Assignment operators
| xref:BloombergLP/bdlb/NullableValueRef/addressOr.adoc[`addressOr`] 
| Return the address of the value, or `address` if null&period;
| xref:BloombergLP/bdlb/NullableValueRef/emplace.adoc[`emplace`] 
| Emplace a value constructed from `args` into the target&period;
| xref:BloombergLP/bdlb/NullableValueRef/has_value.adoc[`has&lowbar;value`] 
| Return `true` if the target contains a value, and `false` otherwise&period;
| xref:BloombergLP/bdlb/NullableValueRef/isNull.adoc[`isNull`] 
| Return whether the target does not contain a value&period;
| xref:BloombergLP/bdlb/NullableValueRef/makeValueInplace.adoc[`makeValueInplace`] 
| Construct a value in place from `args` and return it&period;
| xref:BloombergLP/bdlb/NullableValueRef/operator_star-08e.adoc[`operator&ast;`] 
| Dereference operators
| xref:BloombergLP/bdlb/NullableValueRef/operator_ptr-0a.adoc[`operator&hyphen;&gt;`] 
| Member access operators
| xref:BloombergLP/bdlb/NullableValueRef/reset.adoc[`reset`] 
| Reset the target to the default constructed state (i&period;e&period;, to have the null value)&period;
| 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&period;
| xref:BloombergLP/bdlb/NullableValueRef/valueOrNull.adoc[`valueOrNull`] 
| Return an address providing non&hyphen;modifiable access to the underlying object of a (template parameter) `TYPE` if this object is non&hyphen;null, and 0 otherwise&period;
| xref:BloombergLP/bdlb/NullableValueRef/value_or.adoc[`value&lowbar;or`] 
| Return the underlying value, or `default&lowbar;value` if null&period;
| xref:BloombergLP/bdlb/NullableValueRef/2conversion.adoc[`operator bool`] 
| Return `true` if the target holds a value, and `false` otherwise&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlb/ConstNullableValueRef.adoc[BloombergLP::bdlb::ConstNullableValueRef]`
| This class is a wrapper for either a `bsl&colon;&colon;optional` or `NullableAllocatedValue`, and provides non&hyphen;modifiable access to the wrapped object&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/operator_not_eq-00d.adoc[`operator!&equals;`]
| See the overload above for contract&period;
| xref:BloombergLP/bdlb/operator_not_eq-00fa.adoc[`operator!&equals;`]
| Return whether `lhs` and `rhs` do not have the same value&period;
| xref:BloombergLP/bdlb/operator_not_eq-076.adoc[`operator!&equals;`]
| Return whether the nullable reference is not null&period;
| xref:BloombergLP/bdlb/operator_not_eq-0d.adoc[`operator!&equals;`]
| Return whether `lhs` and `rhs` do not have the same value&period;
| xref:BloombergLP/bdlb/operator_lt-020.adoc[`operator&lt;`]
| Return `false`&semi; nullopt never orders after a nullable reference&period;
| xref:BloombergLP/bdlb/operator_lt-02f.adoc[`operator&lt;`]
| Return whether `lhs` is ordered before `rhs`&period;
| xref:BloombergLP/bdlb/operator_lt-037.adoc[`operator&lt;`]
| Return whether `lhs` is ordered before `rhs`&period;
| xref:BloombergLP/bdlb/operator_lt-0f0.adoc[`operator&lt;`]
| See the overload above for contract&period;
| xref:BloombergLP/bdlb/operator_le-03f.adoc[`operator&lt;&equals;`]
| Return whether `lhs` is ordered before `rhs` or they are equal&period;
| xref:BloombergLP/bdlb/operator_le-07.adoc[`operator&lt;&equals;`]
| See the overload above for contract&period;
| xref:BloombergLP/bdlb/operator_le-0fd.adoc[`operator&lt;&equals;`]
| Return whether `lhs` is ordered before `rhs` or they are equal&period;
| xref:BloombergLP/bdlb/operator_le-0ff.adoc[`operator&lt;&equals;`]
| Return whether `lhs` is null&period;
| xref:BloombergLP/bdlb/operator_eq-013ae.adoc[`operator&equals;&equals;`]
| Return whether `lhs` is null&period;
| xref:BloombergLP/bdlb/operator_eq-06d.adoc[`operator&equals;&equals;`]
| See the overload above for contract&period;
| xref:BloombergLP/bdlb/operator_eq-07f.adoc[`operator&equals;&equals;`]
| Return whether `lhs` and `rhs` have the same value&period;
| xref:BloombergLP/bdlb/operator_eq-0a9.adoc[`operator&equals;&equals;`]
| Return whether `lhs` and `rhs` have the same value&period;
| xref:BloombergLP/bdlb/operator_gt-0110.adoc[`operator&gt;`]
| See the overload above for contract&period;
| xref:BloombergLP/bdlb/operator_gt-0c5e.adoc[`operator&gt;`]
| Return whether `lhs` is ordered after `rhs`&period;
| xref:BloombergLP/bdlb/operator_gt-0e.adoc[`operator&gt;`]
| Return whether `lhs` is ordered after `rhs`&period;
| xref:BloombergLP/bdlb/operator_gt-0f5.adoc[`operator&gt;`]
| Return whether `lhs` is not null&period;
| xref:BloombergLP/bdlb/operator_ge-037.adoc[`operator&gt;&equals;`]
| Return whether `lhs` is ordered after `rhs` or they are equal&period;
| xref:BloombergLP/bdlb/operator_ge-03d.adoc[`operator&gt;&equals;`]
| See the overload above for contract&period;
| xref:BloombergLP/bdlb/operator_ge-05d.adoc[`operator&gt;&equals;`]
| Return whether `lhs` is ordered after `rhs` or they are equal&period;
| xref:BloombergLP/bdlb/operator_ge-0e.adoc[`operator&gt;&equals;`]
| Return `true`&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
