[#BloombergLP-bdlb-operator_3way-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::operator&lt;&equals;&gt;
:relfileprefix: ../../
:mrdocs:

Three&hyphen;way comparison operators

== Synopses

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

Return a three&hyphen;way comparison of the specified `lhs` and `rhs`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class LHS&lowbar;TYPE,
    bsl::three&lowbar;way&lowbar;comparable&lowbar;with&lt;LHS&lowbar;TYPE&gt; RHS&lowbar;TYPE&gt;
constexpr
std::compare&lowbar;three&lowbar;way&lowbar;result&lowbar;t&lt;LHS&lowbar;TYPE, RHS&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/operator_3way-03.adoc[operator&lt;&equals;&gt;](
    xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue&lt;LHS&lowbar;TYPE&gt;] const& lhs,
    xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue&lt;RHS&lowbar;TYPE&gt;] const& rhs);
----

[.small]#xref:BloombergLP/bdlb/operator_3way-03.adoc[_» more&period;&period;&period;_]#

Perform a three&hyphen;way comparison of the specified nullable objects&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class LHS&lowbar;TYPE,
    bsl::three&lowbar;way&lowbar;comparable&lowbar;with&lt;LHS&lowbar;TYPE&gt; RHS&lowbar;TYPE&gt;
constexpr
std::compare&lowbar;three&lowbar;way&lowbar;result&lowbar;t&lt;LHS&lowbar;TYPE, RHS&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/operator_3way-04.adoc[operator&lt;&equals;&gt;](
    xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue&lt;LHS&lowbar;TYPE&gt;] const& lhs,
    xref:bsl/optional-072.adoc[bsl::optional&lt;RHS&lowbar;TYPE&gt;] const& rhs);
----

[.small]#xref:BloombergLP/bdlb/operator_3way-04.adoc[_» more&period;&period;&period;_]#

Perform a three&hyphen;way comparison of the specified nullable objects&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class LHS&lowbar;TYPE,
    bsl::three&lowbar;way&lowbar;comparable&lowbar;with&lt;LHS&lowbar;TYPE&gt; RHS&lowbar;TYPE&gt;
constexpr
std::compare&lowbar;three&lowbar;way&lowbar;result&lowbar;t&lt;LHS&lowbar;TYPE, RHS&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/operator_3way-0a.adoc[operator&lt;&equals;&gt;](
    xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue&lt;LHS&lowbar;TYPE&gt;] const& lhs,
    std::optional&lt;RHS&lowbar;TYPE&gt; const& rhs);
----

[.small]#xref:BloombergLP/bdlb/operator_3way-0a.adoc[_» more&period;&period;&period;_]#

Perform a three&hyphen;way comparison of the specified nullable object and value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class LHS&lowbar;TYPE,
    class RHS&lowbar;TYPE&gt;
requires (!bdlb&colon;&colon;NullableValue&lowbar;DerivedFromOptional&lt;RHS&lowbar;TYPE&gt;) &amp;&amp;
              bsl&colon;&colon;three&lowbar;way&lowbar;comparable&lowbar;with&lt;LHS&lowbar;TYPE, RHS&lowbar;TYPE&gt;
constexpr
std::compare&lowbar;three&lowbar;way&lowbar;result&lowbar;t&lt;LHS&lowbar;TYPE, RHS&lowbar;TYPE&gt;
xref:BloombergLP/bdlb/operator_3way-0b.adoc[operator&lt;&equals;&gt;](
    xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue&lt;LHS&lowbar;TYPE&gt;] const& lhs,
    RHS&lowbar;TYPE const& rhs);
----

[.small]#xref:BloombergLP/bdlb/operator_3way-0b.adoc[_» more&period;&period;&period;_]#

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;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
constexpr
std::strong&lowbar;ordering
xref:BloombergLP/bdlb/operator_3way-07.adoc[operator&lt;&equals;&gt;](
    xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue&lt;TYPE&gt;] const& value,
    xref:bsl/nullopt_t.adoc[bsl::nullopt&lowbar;t] const& nullopt) noexcept;
----

[.small]#xref:BloombergLP/bdlb/operator_3way-07.adoc[_» more&period;&period;&period;_]#

== Return Value

the result of the three&hyphen;way comparison

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lhs*
| left&hyphen;hand operand
| *rhs*
| right&hyphen;hand operand
| *value*
| nullable object to compare
| *nullopt*
| disengaged&hyphen;optional tag
|===


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