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

This template class extends the set of values of its value&hyphen;semantic `TYPE` parameter to include the notion of a &quot;null&quot; value&period; If `TYPE` is fully value&hyphen;semantic, then the augmented type `NullableValue&lt;TYPE&gt;` will be as well&period; In addition to supporting all homogeneous value&hyphen;semantic operations, conversions between comparable underlying value types is also supported&period; Two nullable objects with different underlying types compare equal if their underlying types are comparable and either (1) both objects are null or (2) the non&hyphen;null values compare equal&period; A null nullable object is considered ordered before any non&hyphen;null nullable object&period; Attempts to copy construct, copy assign, or compare incompatible values types will fail to compile&period; The `NullableValue` template cannot be instantiated on an incomplete type, a type that overloads unary `operator&amp;`, or `bsl&colon;&colon;nullopt&lowbar;t`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
class NullableValue
    : public xref:bsl/optional-072.adoc[bsl::optional&lt;TYPE&gt;]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:bsl/optional-072.adoc[bsl::optional&lt;TYPE&gt;]`
| 
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/NullableValue/Base.adoc[`Base`] 
| Base class of this type&period;
| xref:BloombergLP/bdlb/NullableValue/ValueType.adoc[`ValueType`] 
| `ValueType` is an alias for the underlying `TYPE` upon which this template class is instantiated, and represents the type of the managed object&period;
| xref:BloombergLP/bdlb/NullableValue/allocator_type.adoc[`allocator&lowbar;type`] 
| The type of allocator used by this object&period; If `TYPE` is not allocator aware, `allocator&lowbar;type` is a private non&hyphen;allocator type that effectively removes the allocator&hyphen;specific constructors from consideration during overload resolution&period;
| xref:BloombergLP/bslstl/Optional_Base-05/value_type.adoc[`value&lowbar;type`] 
| `value&lowbar;type` is an alias for the underlying `TYPE` upon which this template class is instantiated, and represents the type of the managed object&period; The name is chosen so it is compatible with the `std&colon;&colon;optional` implementation&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/NullableValue/2constructor-093.adoc[`NullableValue`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlb/NullableValue/operator_assign-087.adoc[`operator&equals;`] 
| Assignment operators
| xref:BloombergLP/bdlb/NullableValue/addressOr.adoc[`addressOr`] 
| 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 the specified `address` otherwise&period;
| xref:bsl/optional-072/and_then-08d.adoc[`and&lowbar;then`] 
| `and&lowbar;then` overloads
| xref:BloombergLP/bdlb/NullableValue/bdexStreamIn.adoc[`bdexStreamIn`] 
| Assign to this object the value read from the specified input `stream` using the specified `version` format, and return a reference to `stream`&period; If `stream` is initially invalid, this operation has no effect&period; If `version` is not supported, this object is unaltered and `stream` is invalidated, but otherwise unmodified&period; If `version` is supported but `stream` becomes invalid during this operation, this object has an undefined, but valid, state&period; Note that no version is read from `stream`&period; See the `bslx` package&hyphen;level documentation for more information on BDEX streaming of value&hyphen;semantic types and containers&period;
| xref:BloombergLP/bdlb/NullableValue/bdexStreamOut.adoc[`bdexStreamOut`] 
| Write the value of this object, using the specified `version` format, to the specified output `stream`, and return a reference to `stream`&period; If `stream` is initially invalid, this operation has no effect&period; If `version` is not supported, `stream` is invalidated, but otherwise unmodified&period; Note that `version` is not written to `stream`&period; See the `bslx` package&hyphen;level documentation for more information on BDEX streaming of value&hyphen;semantic types and containers&period;
| xref:BloombergLP/bslstl/Optional_Base-05/emplace-02.adoc[`emplace`] 
| `emplace` overloads
| xref:BloombergLP/bslstl/Optional_Base-05/get_allocator.adoc[`get&lowbar;allocator`] 
| Return allocator used for construction of `value&lowbar;type`&period;
| xref:BloombergLP/bslstl/Optional_Base-05/has_value.adoc[`has&lowbar;value`] 
| Return `false` if this object is disengaged, and `true` otherwise&period;
| xref:BloombergLP/bdlb/NullableValue/isNull.adoc[`isNull`] 
| Return `true` if this object is null, and `false` otherwise&period;
| xref:BloombergLP/bdlb/NullableValue/makeValue-0b.adoc[`makeValue`] 
| `makeValue` overloads
| xref:BloombergLP/bdlb/NullableValue/makeValueInplace.adoc[`makeValueInplace`] 
| Assign to this nullable object the value of the (template parameter) `TYPE` created in place using the specified `args`&period; Return a reference providing modifiable access to the created (value) object&period; The object is also accessible via the `value` method&period; If this nullable object already contains an object (`false &equals;&equals; isNull()`), that object is destroyed before the new object is created&period; If `TYPE` has the trait `bslma&colon;&colon;UsesBslmaAllocator` (`TYPE` is allocator&hyphen;enabled) the allocator specified at the construction of this nullable object is used to supply memory to the value object&period; Attempts to explicitly specify via `args` another allocator to supply memory to the created (value) object are disallowed by the compiler&period; Note that if the constructor of `TYPE` throws an exception this object is left in the null state&period;
| xref:BloombergLP/bdlb/NullableValue/maxSupportedBdexVersion-0c.adoc[`maxSupportedBdexVersion`] 
| `maxSupportedBdexVersion` overloads
| xref:BloombergLP/bslstl/Optional_Base-05/operator_star-0b.adoc[`operator&ast;`] 
| Dereference operators
| xref:BloombergLP/bslstl/Optional_Base-05/operator_ptr-0a.adoc[`operator&hyphen;&gt;`] 
| Member access operators
| xref:bsl/optional-072/or_else-09.adoc[`or&lowbar;else`] 
| `or&lowbar;else` overloads
| xref:BloombergLP/bdlb/NullableValue/print.adoc[`print`] 
| Format this object to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to `stream`&period; If `level` is specified, optionally specify `spacesPerLevel`, the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period;
| xref:BloombergLP/bslstl/Optional_Base-05/reset.adoc[`reset`] 
| Reset this object to the default constructed state (i&period;e&period;, to a disengaged state)&period;
| xref:BloombergLP/bslstl/Optional_Base-05/swap.adoc[`swap`] 
| Efficiently exchange the value of this object with the value of the specified `other` object&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee if the template parameter `t&lowbar;TYPE` provides that guarantee and the result of the `hasValue` method for the two objects being swapped is the same&period; The behavior is undefined unless this object was created with the same allocator as `other`&period;
| xref:bsl/optional-072/transform-09d.adoc[`transform`] 
| `transform` overloads
| xref:BloombergLP/bdlb/NullableValue/value-03.adoc[`value`] 
| `value` overloads
| xref:BloombergLP/bdlb/NullableValue/valueOr-03.adoc[`valueOr`] 
| `valueOr` overloads
| xref:BloombergLP/bdlb/NullableValue/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/bslstl/Optional_Base-05/value_or-07.adoc[`value&lowbar;or`] 
| `value&lowbar;or` overloads
| xref:BloombergLP/bdlb/NullableValue/2conversion-00.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;NullableValue, HasPrintMethod&gt;`] 
| `NullableValue` always provides a `print` method&period;
| xref:BloombergLP/bdlb/NullableValue/2conversion-03.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;NullableValue, IsBitwiseCopyable, bslmf&colon;&colon;IsBitwiseCopyable&lt;TYPE&gt;&colon;&colon;value&gt;`] 
| `NullableValue` is bitwise copyable when `TYPE` is bitwise copyable&period;
| xref:BloombergLP/bdlb/NullableValue/2conversion-09.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;NullableValue, IsBitwiseMoveable, bslmf&colon;&colon;IsBitwiseMoveable&lt;TYPE&gt;&colon;&colon;value&gt;`] 
| `NullableValue` is bitwise moveable when `TYPE` is bitwise moveable&period;
| xref:BloombergLP/bdlb/NullableValue/2conversion-07.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;NullableValue, UsesBslmaAllocator, bslma&colon;&colon;UsesBslmaAllocator&lt;TYPE&gt;&colon;&colon;value&gt;`] 
| `NullableValue` uses a `bslma&colon;&colon;Allocator` when `TYPE` does&period;
| xref:BloombergLP/bslstl/Optional_Base-05/2conversion-076.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;Optional&lowbar;Base, IsBitwiseCopyable, BloombergLP&colon;&colon;bslmf&colon;&colon;IsBitwiseCopyable&lt;t&lowbar;TYPE&gt;&colon;&colon;value&gt;`] 
| Nested trait declaration for `bslmf&colon;&colon;IsBitwiseCopyable`&period;
| xref:BloombergLP/bslstl/Optional_Base-05/2conversion-04.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;Optional&lowbar;Base, IsBitwiseMoveable, BloombergLP&colon;&colon;bslmf&colon;&colon;IsBitwiseMoveable&lt;t&lowbar;TYPE&gt;&colon;&colon;value&gt;`] 
| Nested trait declaration for `bslmf&colon;&colon;IsBitwiseMoveable`&period;
| xref:BloombergLP/bslstl/Optional_Base-05/2conversion-0a.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;Optional&lowbar;Base, UsesAllocatorArgT&gt;`] 
| Nested trait declaration for `bslmf&colon;&colon;UsesAllocatorArgT`&period;
| xref:BloombergLP/bslstl/Optional_Base-05/2conversion-0b.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;Optional&lowbar;Base, UsesBslmaAllocator&gt;`] 
| Nested trait declaration for `bslma&colon;&colon;UsesBslmaAllocator`&period;
| xref:bsl/optional-072/2conversion-0af.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;optional, IsBitwiseCopyable, BloombergLP&colon;&colon;bslmf&colon;&colon;IsBitwiseCopyable&lt;t&lowbar;TYPE&gt;&colon;&colon;value&gt;`] 
| Nested trait declaration for `bslmf&colon;&colon;IsBitwiseCopyable`&period;
| xref:bsl/optional-072/2conversion-0a1.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;optional, IsBitwiseMoveable, BloombergLP&colon;&colon;bslmf&colon;&colon;IsBitwiseMoveable&lt;t&lowbar;TYPE&gt;&colon;&colon;value&gt;`] 
| Nested trait declaration for `bslmf&colon;&colon;IsBitwiseMoveable`&period;
| xref:bsl/optional-072/2conversion-0d.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;optional, UsesAllocatorArgT, BloombergLP&colon;&colon;bslma&colon;&colon;UsesBslmaAllocator&lt;t&lowbar;TYPE&gt;&colon;&colon;value&gt;`] 
| Nested trait declaration for `bslmf&colon;&colon;UsesAllocatorArgT`&period;
| xref:bsl/optional-072/2conversion-05.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;optional, UsesBslmaAllocator, BloombergLP&colon;&colon;bslma&colon;&colon;UsesBslmaAllocator&lt;t&lowbar;TYPE&gt;&colon;&colon;value&gt;`] 
| Nested trait declaration for `bslma&colon;&colon;UsesBslmaAllocator`&period;
| xref:BloombergLP/bslstl/Optional_Base-05/2conversion-071.adoc[`operator bool`] 
| Return `false` if this object is disengaged, and `true` otherwise&period;
|===


== Protected Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Optional_Base-05/AllocType.adoc[`AllocType`] 
| This `typedef` is an alias to `allocator&lowbar;type`&period;
|===


== Protected Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Optional_Base-05/assignOrEmplace.adoc[`assignOrEmplace`] 
| If `&ast;this` holds an object, assign to that object the value of the specified `rhs`, converted to `t&lowbar;TYPE`&period; Otherwise, construct a held object from `rhs`, converted to `t&lowbar;TYPE`&period; The allocators of `&ast;this` and `rhs` remain unchanged&period;
| xref:BloombergLP/bslstl/Optional_Base-05/dereferenceRaw-049.adoc[`dereferenceRaw`] 
| `dereferenceRaw` overloads
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `BloombergLP::bdlb::NullableValue`
| This template class extends the set of values of its value&hyphen;semantic `TYPE` parameter to include the notion of a &quot;null&quot; value&period; If `TYPE` is fully value&hyphen;semantic, then the augmented type `NullableValue&lt;TYPE&gt;` will be as well&period; In addition to supporting all homogeneous value&hyphen;semantic operations, conversions between comparable underlying value types is also supported&period; Two nullable objects with different underlying types compare equal if their underlying types are comparable and either (1) both objects are null or (2) the non&hyphen;null values compare equal&period; A null nullable object is considered ordered before any non&hyphen;null nullable object&period; Attempts to copy construct, copy assign, or compare incompatible values types will fail to compile&period; The `NullableValue` template cannot be instantiated on an incomplete type, a type that overloads unary `operator&amp;`, or `bsl&colon;&colon;nullopt&lowbar;t`&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/nullableValue_acceptsBslOptional.adoc[`nullableValue&lowbar;acceptsBslOptional`]
| Component&hyphen;private constraint helper for `bsl&colon;&colon;optional` conversion&period;
| xref:BloombergLP/bdlb/operator_not_eq-03.adoc[`operator!&equals;`]
| Return `true` if the specified nullable objects do not have the same value&period;
| xref:BloombergLP/bdlb/operator_not_eq-044.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise&period; A nullable object and a value of some type do not have the same value if either the nullable object is null, or its underlying value does not compare equal to the other value&period; Note that this function will fail to compile if `LHS&lowbar;TYPE` and `RHS&lowbar;TYPE` are not compatible&period;
| xref:BloombergLP/bdlb/operator_not_eq-0476.adoc[`operator!&equals;`]
| Return `true` if the specified nullable object and `std&colon;&colon;optional` do not have the same value&period;
| xref:BloombergLP/bdlb/operator_not_eq-060.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` nullable objects do not have the same value, and `false` otherwise&period; Two nullable objects do not have the same value if one is null and the other is non&hyphen;null, or if both are non&hyphen;null and the values of their underlying objects do not compare equal&period; Note that this function will fail to compile if `LHS&lowbar;TYPE` and `RHS&lowbar;TYPE` are not compatible&period;
| xref:BloombergLP/bdlb/operator_not_eq-07b.adoc[`operator!&equals;`]
| Return `true` if the specified nullable objects do not have the same value&period;
| xref:BloombergLP/bdlb/operator_not_eq-0a1.adoc[`operator!&equals;`]
| Return `true` if the specified nullable objects do not have the same value&period;
| xref:BloombergLP/bdlb/operator_lt-00.adoc[`operator&lt;`]
| Return `true` if the specified `lhs` nullable object is ordered before the specified `rhs`, and `false` otherwise&period; `lhs` is ordered before `rhs` if `lhs` is null or `lhs&period;value()` is ordered before `rhs`&period;
| xref:BloombergLP/bdlb/operator_lt-032.adoc[`operator&lt;`]
| Return `true` if `lhs` is ordered before `rhs`, and `false` otherwise&period;
| xref:BloombergLP/bdlb/operator_lt-07.adoc[`operator&lt;`]
| Return `true` if `lhs` is ordered before `rhs`, and `false` otherwise&period;
| xref:BloombergLP/bdlb/operator_lt-0a0.adoc[`operator&lt;`]
| Return `true` if `lhs` is ordered before `rhs`, and `false` otherwise&period;
| xref:BloombergLP/bdlb/operator_lt-0a1.adoc[`operator&lt;`]
| Return `true` if the specified `lhs` nullable object is ordered before the specified `rhs` nullable object, and `false` otherwise&period; `lhs` is ordered before `rhs` if `lhs` is null and `rhs` is non&hyphen;null or if both are non&hyphen;null and `lhs&period;value()` is ordered before `rhs&period;value()`&period; Note that this function will fail to compile if `LHS&lowbar;TYPE` and `RHS&lowbar;TYPE` are not compatible&period;
| xref:BloombergLP/bdlb/operator_lt-0b.adoc[`operator&lt;`]
| If neither of the specified `lhs` and `rhs` contain a value, return `false`&period; If `lhs` contains a value, and `rhs` does not, return `false`&period; If `lhs` does not contains a value, `rhs` does, return `true`&period; Otherwise, return `lhs&period;value &lt; rhs&period;value()`&period;
| xref:BloombergLP/bdlb/operator_le-023.adoc[`operator&lt;&equals;`]
| Return `true` if the specified `lhs` nullable object is ordered before the specified `rhs` or `lhs` and `rhs` have the same value, and `false` otherwise&period; (See `operator&lt;` and `operator&equals;&equals;`&period;)
| xref:BloombergLP/bdlb/operator_le-041.adoc[`operator&lt;&equals;`]
| If neither of the specified `lhs` and `rhs` contain a value, return `true`&period; If `lhs` contains a value, and `rhs` does not, return `false`&period; If `lhs` does not contains a value, `rhs` does, return `true`&period; Otherwise, return `lhs&period;value &lt;&equals; rhs&period;value()`&period;
| xref:BloombergLP/bdlb/operator_le-047.adoc[`operator&lt;&equals;`]
| Return `true` if `lhs` is ordered before `rhs` or they are equal&period;
| xref:BloombergLP/bdlb/operator_le-06b.adoc[`operator&lt;&equals;`]
| Return `true` if `lhs` is ordered before `rhs` or they are equal&period;
| xref:BloombergLP/bdlb/operator_le-086.adoc[`operator&lt;&equals;`]
| Return `true` if `lhs` is ordered before `rhs` or they are equal&period;
| xref:BloombergLP/bdlb/operator_le-08e.adoc[`operator&lt;&equals;`]
| Return `true` if the specified `lhs` nullable object is ordered before the specified `rhs` nullable object or `lhs` and `rhs` have the same value, and `false` otherwise&period; (See `operator&lt;` and `operator&equals;&equals;`&period;) Note that this operator returns `&ast;lhs &lt;&equals; &ast;rhs` when both operands are of `NullableValue` type and have a value&period; Also note that this function will fail to compile if `LHS&lowbar;TYPE` and `RHS&lowbar;TYPE` are not compatible&period;
| xref:BloombergLP/bdlb/operator_3way-03.adoc[`operator&lt;&equals;&gt;`]
| Perform a three&hyphen;way comparison of the specified `lhs` and the specified `rhs` objects by using the comparison operators of `t&lowbar;LHS` and `t&lowbar;RHS`&semi; return the result of that comparison&period;
| xref:BloombergLP/bdlb/operator_3way-04.adoc[`operator&lt;&equals;&gt;`]
| Perform a three&hyphen;way comparison of the specified nullable objects&period;
| xref:BloombergLP/bdlb/operator_3way-07.adoc[`operator&lt;&equals;&gt;`]
| Perform a three&hyphen;way comparison of the specified `value` and one of type `bsl&colon;&colon;nullopt&lowbar;t`&semi; return the result of that comparison&period;
| xref:BloombergLP/bdlb/operator_3way-0a.adoc[`operator&lt;&equals;&gt;`]
| Perform a three&hyphen;way comparison of the specified nullable objects&period;
| xref:BloombergLP/bdlb/operator_3way-0b.adoc[`operator&lt;&equals;&gt;`]
| Perform a three&hyphen;way comparison of the specified nullable object and value&period;
| xref:BloombergLP/bdlb/operator_eq-0108.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `value` is null, and `false` otherwise&period;
| xref:BloombergLP/bdlb/operator_eq-047.adoc[`operator&equals;&equals;`]
| Return `true` if the specified nullable objects have the same value&period;
| xref:BloombergLP/bdlb/operator_eq-052.adoc[`operator&equals;&equals;`]
| Return `true` if the specified nullable objects have the same value, and `false` otherwise&period;
| xref:BloombergLP/bdlb/operator_eq-070.adoc[`operator&equals;&equals;`]
| Return `true` if the specified nullable objects have the same value&period;
| xref:BloombergLP/bdlb/operator_eq-0aa.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` nullable objects have the same value, and `false` otherwise&period; Two nullable objects have the same value if both are null, or if both are non&hyphen;null and the values of their underlying objects compare equal&period; Note that this function will fail to compile if `LHS&lowbar;TYPE` and `RHS&lowbar;TYPE` are not compatible&period;
| xref:BloombergLP/bdlb/operator_eq-0da.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise&period; A nullable object and a value of some type have the same value if the nullable object is non&hyphen;null and its underlying value compares equal to the other value&period; Note that this function will fail to compile if `LHS&lowbar;TYPE` and `RHS&lowbar;TYPE` are not compatible&period;
| xref:BloombergLP/bdlb/operator_eq-0f6c.adoc[`operator&equals;&equals;`]
| Return `true` if the specified nullable objects have the same value, and `false` otherwise&period;
| xref:BloombergLP/bdlb/operator_gt-00.adoc[`operator&gt;`]
| Return `true` if `lhs` is ordered after `rhs`, and `false` otherwise&period;
| xref:BloombergLP/bdlb/operator_gt-013.adoc[`operator&gt;`]
| Return `true` if `lhs` is ordered after `rhs`, and `false` otherwise&period;
| xref:BloombergLP/bdlb/operator_gt-03.adoc[`operator&gt;`]
| Return `true` if `lhs` is ordered after `rhs`, and `false` otherwise&period;
| xref:BloombergLP/bdlb/operator_gt-04b.adoc[`operator&gt;`]
| If neither of the specified `lhs` and `rhs` contain a value, return `false`&period; If `lhs` contains a value, and `rhs` does not, return `true`&period; If `lhs` does not contains a value, `rhs` does, return `false`&period; Otherwise, return `lhs&period;value &gt; rhs&period;value()`&period;
| xref:BloombergLP/bdlb/operator_gt-075.adoc[`operator&gt;`]
| Return `true` if the specified `lhs` nullable object is ordered after the specified `rhs`, and `false` otherwise&period; `lhs` is ordered after `rhs` if `lhs` is not null and `lhs&period;value()` is ordered after `rhs`&period;
| xref:BloombergLP/bdlb/operator_gt-0da.adoc[`operator&gt;`]
| Return `true` if the specified `lhs` nullable object is ordered after the specified `rhs` nullable object, and `false` otherwise&period; `lhs` is ordered after `rhs` if `lhs` is non&hyphen;null and `rhs` is null or if both are non&hyphen;null and `lhs&period;value()` is ordered after `rhs&period;value()`&period; Note that this operator returns `&ast;lhs &gt; &ast;rhs` when both operands are of `NullableValue` type and both have values&period; Also note that this function will fail to compile if `LHS&lowbar;TYPE` and `RHS&lowbar;TYPE` are not compatible&period;
| xref:BloombergLP/bdlb/operator_ge-01d1.adoc[`operator&gt;&equals;`]
| If neither of the specified `lhs` and `rhs` contain a value, return `true`&period; If `lhs` contains a value, and `rhs` does not, return `true`&period; If `lhs` does not contains a value, `rhs` does, return `false`&period; Otherwise, return `lhs&period;value &gt;&equals; rhs&period;value()`&period;
| xref:BloombergLP/bdlb/operator_ge-058.adoc[`operator&gt;&equals;`]
| Return `true` if the specified `lhs` nullable object is ordered after the specified `rhs` nullable object or `lhs` and `rhs` have the same value, and `false` otherwise&period; (See `operator&gt;` and `operator&equals;&equals;`&period;) Note that this operator returns `&ast;lhs &gt;&equals; &ast;rhs` when both operands are of `NullableValue` type and have a value&period; Also note that this function will fail to compile if `LHS&lowbar;TYPE` and `RHS&lowbar;TYPE` are not compatible&period;
| xref:BloombergLP/bdlb/operator_ge-07.adoc[`operator&gt;&equals;`]
| Return `true` if the specified `lhs` nullable object is ordered after the specified `rhs` or `lhs` and `rhs` have the same value, and `false` otherwise&period; (See `operator&gt;` and `operator&equals;&equals;`&period;)
| xref:BloombergLP/bdlb/operator_ge-082.adoc[`operator&gt;&equals;`]
| Return `true` if `lhs` is ordered after `rhs` or they are equal&period;
| xref:BloombergLP/bdlb/operator_ge-087.adoc[`operator&gt;&equals;`]
| Return `true` if `lhs` is ordered after `rhs` or they are equal&period;
| xref:BloombergLP/bdlb/operator_ge-0d.adoc[`operator&gt;&equals;`]
| Return `true` if `lhs` is ordered after `rhs` or they are equal&period;
| xref:BloombergLP/bdlb/swap-02.adoc[`swap`]
| Exchange the values of the specified `lhs` and `rhs` objects when `TYPE` does not use a `bslma&colon;&colon;Allocator`&period;
| xref:BloombergLP/bdlb/swap-03.adoc[`swap`]
| Exchange the values of the specified `rhs` and `lhs` objects&period; This function provides the no&hyphen;throw exception&hyphen;safety guarantee if the (template parameter) `TYPE` provides that guarantee, the two objects were created with the same allocator (if applicable), and the result of the `isNull` method for the two objects is the same&semi; otherwise this function provides the basic guarantee&period;
| xref:bsl/PrintTo-0f.adoc[`&colon;&colon;bsl&colon;&colon;PrintTo`]
| Write the specified `value` to the specified `&ast;stream`, surrounded by double quotes&period;
| xref:bsl/operator_not_eq-0c3.adoc[`&colon;&colon;bsl&colon;&colon;operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` `optional` objects do not have the same value, and `false` otherwise&period; Two `optional` objects do not have the same value if one is disengaged and the other is engaged, or if both are engaged and the values of their underlying objects do not compare equal&period; This function can be called in constant expressions only if neither `t&lowbar;LHS&lowbar;TYPE` nor `t&lowbar;RHS&lowbar;TYPE` is allocator&hyphen;aware&period;
| xref:bsl/operator_not_eq-0cf.adoc[`&colon;&colon;bsl&colon;&colon;operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` optional objects do not have the same value, and `false` otherwise&period; Two optional objects do not have the same value if one is disengaged and the other is engaged, or if both are engaged and the values of their underlying objects do not compare equal&period; Note that this function will fail to compile if `t&lowbar;LHS&lowbar;TYPE` and `t&lowbar;RHS&lowbar;TYPE` are not compatible&period; These functions can be called in constant expressions only if the `bsl&colon;&colon;optional`&apos;s value type is not allocator&hyphen;aware&period;
| xref:bsl/operator_not_eq-0e.adoc[`&colon;&colon;bsl&colon;&colon;operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise&period; An `optional` object and a value of some type do not have the same value if either the optional object is disengaged, or its underlying value does not compare equal to the other value&period; These function can be called in constant expressions only if the `optional`&apos;s value type is not allocator&hyphen;aware&period;
| xref:bsl/operator_lt-00.adoc[`&colon;&colon;bsl&colon;&colon;operator&lt;`]
| Return `true` if the specified `lhs` `optional` object is ordered before the specified `rhs`, and `false` otherwise&period; `lhs` is ordered before `rhs` if `lhs` is disengaged or `lhs&period;value()` is ordered before `rhs`&period; This function can be called in constant expressions only if `t&lowbar;LHS&lowbar;TYPE` is not allocator&hyphen;aware&period;
| xref:bsl/operator_lt-010.adoc[`&colon;&colon;bsl&colon;&colon;operator&lt;`]
| Return `true` if the specified `lhs` optional object is ordered before the specified `rhs` optional object, and `false` otherwise&period; `lhs` is ordered before `rhs` if `lhs` is disengaged and `rhs` is engaged or if both are engaged and `lhs&period;value()` is ordered before `rhs&period;value()`&period; Note that this function will fail to compile if `t&lowbar;LHS&lowbar;TYPE` and `t&lowbar;RHS&lowbar;TYPE` are not compatible&period; These functions can be called in constant expressions only if the `bsl&colon;&colon;optional`&apos;s value type is not allocator&hyphen;aware&period;
| xref:bsl/operator_lt-0b.adoc[`&colon;&colon;bsl&colon;&colon;operator&lt;`]
| Return `true` if the specified `lhs` `optional` object is ordered before the specified `rhs` `optional` object, and `false` otherwise&period; `lhs` is ordered before `rhs` if `lhs` is disengaged and `rhs` is engaged or if both are engaged and `lhs&period;value()` is ordered before `rhs&period;value()`&period; This function can be called in constant expressions only if neither `t&lowbar;LHS&lowbar;TYPE` nor `t&lowbar;RHS&lowbar;TYPE` is allocator&hyphen;aware&period;
| xref:bsl/operator_le-03.adoc[`&colon;&colon;bsl&colon;&colon;operator&lt;&equals;`]
| Return `true` if the specified `lhs` `optional` object is ordered before the specified `rhs` or `lhs` and `rhs` have the same value, and `false` otherwise&period; (See `operator&lt;` and `operator&equals;&equals;`&period;) This function can be called in constant expressions only if `t&lowbar;LHS&lowbar;TYPE` is not allocator&hyphen;aware&period;
| xref:bsl/operator_le-04.adoc[`&colon;&colon;bsl&colon;&colon;operator&lt;&equals;`]
| Return `true` if the specified `lhs` is ordered before the specified `rhs` optional object or `lhs` and `rhs` have the same value, and `false` otherwise&period; (See `operator&lt;` and `operator&equals;&equals;`&period;) Note that this function will fail to compile if `t&lowbar;LHS&lowbar;TYPE` and `t&lowbar;RHS&lowbar;TYPE` are not compatible&period; These functions can be called in constant expressions only if the `bsl&colon;&colon;optional`&apos;s value type is not allocator&hyphen;aware&period;
| xref:bsl/operator_le-0c.adoc[`&colon;&colon;bsl&colon;&colon;operator&lt;&equals;`]
| Return `true` if the specified `lhs` `optional` object is ordered before the specified `rhs` `optional` object or if `lhs` and `rhs` have the same value, and `false` otherwise&period; (See `operator&lt;` and `operator&equals;&equals;`&period;) This function can be called in constant expressions only if neither `t&lowbar;LHS&lowbar;TYPE` nor `t&lowbar;RHS&lowbar;TYPE` is allocator&hyphen;aware&period;
| xref:bsl/operator_3way-00.adoc[`&colon;&colon;bsl&colon;&colon;operator&lt;&equals;&gt;`]
| Perform a three&hyphen;way comparison of the specified `lhs` and the specified `rhs` objects by using the comparison operators of `t&lowbar;LHS` and `t&lowbar;RHS`&semi; return the result of that comparison&period; This function can be called in constant expressions only if neither `t&lowbar;LHS` nor `t&lowbar;RHS` is allocator&hyphen;aware&period;
| xref:bsl/operator_3way-070.adoc[`&colon;&colon;bsl&colon;&colon;operator&lt;&equals;&gt;`]
| Perform a three&hyphen;way comparison of the specified `lhs` and the specified `rhs` objects by using the comparison operators of `t&lowbar;LHS` and `t&lowbar;RHS`&semi; return the result of that comparison&period; This function can be called in constant expressions only if `t&lowbar;LHS` is not allocator&hyphen;aware&period;
| xref:bsl/operator_3way-0a.adoc[`&colon;&colon;bsl&colon;&colon;operator&lt;&equals;&gt;`]
| Perform a three&hyphen;way comparison of the specified `lhs` and the specified `rhs` objects by using the comparison operators of `t&lowbar;LHS` and `t&lowbar;RHS`&semi; return the result of that comparison&period; This function can be called in constant expressions only if `t&lowbar;LHS` is not allocator&hyphen;aware&period;
| xref:bsl/operator_3way-0d1.adoc[`&colon;&colon;bsl&colon;&colon;operator&lt;&equals;&gt;`]
| Perform a three&hyphen;way comparison of the specified `value` and `nullopt`&semi; return the result of that comparison&period; This function can be called in constant expressions only if `t&lowbar;TYPE` is not allocator&hyphen;aware&period;
| xref:bsl/operator_eq-02a.adoc[`&colon;&colon;bsl&colon;&colon;operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise&period; An `optional` object and a value of some type have the same value if the optional object is engaged and its underlying value compares equal to the other value&period; These functions can be called in constant expressions only if the `optional`&apos;s value type is not allocator&hyphen;aware&period;
| xref:bsl/operator_eq-097.adoc[`&colon;&colon;bsl&colon;&colon;operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` `optional` objects have the same value, and `false` otherwise&period; Two `optional` objects have the same value if both are disengaged, or if both are engaged and the values of their underlying objects compare equal&period; This function can be called in constant expressions only if neither `t&lowbar;LHS&lowbar;TYPE` nor `t&lowbar;RHS&lowbar;TYPE` is allocator&hyphen;aware&period;
| xref:bsl/operator_eq-09de.adoc[`&colon;&colon;bsl&colon;&colon;operator&equals;&equals;`]
| Compare a `std&colon;&colon;optional` with a `bsl&colon;&colon;optional` for equality&period;
| xref:bsl/operator_eq-0db.adoc[`&colon;&colon;bsl&colon;&colon;operator&equals;&equals;`]
| Return `true` if the specified `value` is disengaged, and `false` otherwise&period; This function can be called in constant expressions only if `t&lowbar;TYPE` is not allocator&hyphen;aware&period;
| xref:bsl/operator_gt-04.adoc[`&colon;&colon;bsl&colon;&colon;operator&gt;`]
| Return `true` if the specified `lhs` `optional` object is ordered after the specified `rhs`, and `false` otherwise&period; `lhs` is ordered after `rhs` if `lhs` is engaged and `lhs&period;value()` is ordered after `rhs`&period; This function can be called in constant expressions only if `t&lowbar;LHS&lowbar;TYPE` is not allocator&hyphen;aware&period;
| xref:bsl/operator_gt-07.adoc[`&colon;&colon;bsl&colon;&colon;operator&gt;`]
| Return `true` if the specified `lhs` optional object is ordered after the specified `rhs` optional object, and `false` otherwise&period; `lhs` is ordered after `rhs` if `lhs` is engaged and `rhs` is disengaged or if both are engaged and `lhs&period;value()` is ordered after `rhs&period;value()`&period; Note that this function will fail to compile if `t&lowbar;LHS&lowbar;TYPE` and `t&lowbar;RHS&lowbar;TYPE` are not compatible&period; These functions can be called in constant expressions only if the `bsl&colon;&colon;optional`&apos;s value type is not allocator&hyphen;aware&period;
| xref:bsl/operator_gt-0bc.adoc[`&colon;&colon;bsl&colon;&colon;operator&gt;`]
| Return `true` if the specified `lhs` `optional` object is ordered after the specified `rhs` `optional` object, and `false` otherwise&period; `lhs` is ordered after `rhs` if `lhs` is engaged and `rhs` is disengaged or if both are engaged and `lhs&period;value()` is ordered after `rhs&period;value()`&period; This function can be called in constant expressions only if neither `t&lowbar;LHS&lowbar;TYPE` nor `t&lowbar;RHS&lowbar;TYPE` is allocator&hyphen;aware&period;
| xref:bsl/operator_ge-05.adoc[`&colon;&colon;bsl&colon;&colon;operator&gt;&equals;`]
| Return `true` if the specified `lhs` `optional` object is ordered after the specified `rhs` `optional` object or if `lhs` and `rhs` have the same value, and `false` otherwise&period; (See `operator&gt;` and `operator&equals;&equals;`&period;) This function can be called in constant expressions only if neither `t&lowbar;LHS&lowbar;TYPE` nor `t&lowbar;RHS&lowbar;TYPE` is allocator&hyphen;aware&period;
| xref:bsl/operator_ge-06.adoc[`&colon;&colon;bsl&colon;&colon;operator&gt;&equals;`]
| Return `true` if the specified `lhs` `optional` object is ordered after the specified `rhs` or if `lhs` and `rhs` have the same value, and `false` otherwise&period; (See `operator&gt;` and `operator&equals;&equals;`&period;) This function can be called in constant expressions only if `t&lowbar;LHS&lowbar;TYPE` is not allocator&hyphen;aware&period;
| xref:bsl/operator_ge-088.adoc[`&colon;&colon;bsl&colon;&colon;operator&gt;&equals;`]
| Return `true` if the specified `lhs` optional object is ordered after the specified `rhs` optional object or `lhs` and `rhs` have the same value, and `false` otherwise&period; (See `operator&gt;` and `operator&equals;&equals;`&period;) Note that this function will fail to compile if `t&lowbar;LHS&lowbar;TYPE` and `t&lowbar;RHS&lowbar;TYPE` are not compatible&period; These functions can be called in constant expressions only if the `bsl&colon;&colon;optional`&apos;s value type is not allocator&hyphen;aware&period;
| xref:bsl/swap-00c.adoc[`&colon;&colon;bsl&colon;&colon;swap`]
| Efficiently exchange the values of the specified `lhs` and `rhs` objects&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee if the template parameter `t&lowbar;TYPE` provides that guarantee and the result of the `hasValue` method for `lhs` and `rhs` is the same&period; This function can be called in constant expressions only if `t&lowbar;TYPE` is not allocator&hyphen;aware&period;
| xref:bsl/swap-04d.adoc[`&colon;&colon;bsl&colon;&colon;swap`]
| Efficiently exchange the values of the specified `lhs` and `rhs` objects&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee if the template parameter `t&lowbar;TYPE` provides that guarantee, `lhs` and `rhs` have equal allocators, and `lhs&period;hasValue() &equals;&equals; rhs&period;hasValue()`&period;
| xref:bsl/swap-0f3.adoc[`&colon;&colon;bsl&colon;&colon;swap`]
| Efficiently exchange the values of the specified `lhs` and `rhs` objects&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee if the template parameter `t&lowbar;TYPE` provides that guarantee and the result of the `hasValue` method for `lhs` and `rhs` is the same&period;
| xref:BloombergLP/bdlat_NullableValueFunctions/bdlat_nullableValueAccessValue-0c3.adoc[`&colon;&colon;BloombergLP&colon;&colon;bdlat&lowbar;NullableValueFunctions&colon;&colon;bdlat&lowbar;nullableValueAccessValue`]
| Default customization&hyphen;point implementation of `accessValue` for `bdlb&colon;&colon;NullableValue`&period;
| xref:BloombergLP/bdlat_NullableValueFunctions/bdlat_nullableValueIsNull-05.adoc[`&colon;&colon;BloombergLP&colon;&colon;bdlat&lowbar;NullableValueFunctions&colon;&colon;bdlat&lowbar;nullableValueIsNull`]
| Default customization&hyphen;point implementation of `isNull` for `bdlb&colon;&colon;NullableValue`&period;
| xref:BloombergLP/bdlat_NullableValueFunctions/bdlat_nullableValueMakeValue-0b.adoc[`&colon;&colon;BloombergLP&colon;&colon;bdlat&lowbar;NullableValueFunctions&colon;&colon;bdlat&lowbar;nullableValueMakeValue`]
| Default customization&hyphen;point implementation of `makeValue` for `bdlb&colon;&colon;NullableValue`&period;
| xref:BloombergLP/bdlat_NullableValueFunctions/bdlat_nullableValueManipulateValue-041.adoc[`&colon;&colon;BloombergLP&colon;&colon;bdlat&lowbar;NullableValueFunctions&colon;&colon;bdlat&lowbar;nullableValueManipulateValue`]
| Default customization&hyphen;point implementation of `manipulateValue` for `bdlb&colon;&colon;NullableValue`&period;
| xref:BloombergLP/bslstl/optional_acceptsBslOptional.adoc[`&colon;&colon;BloombergLP&colon;&colon;bslstl&colon;&colon;optional&lowbar;acceptsBslOptional`]
| Component&hyphen;private constraint helper for `Optional&lowbar;DerivedFromBslOptional`&period;
|===


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