[#bsl-operator_3way-00]
= xref:bsl.adoc[bsl]::operator&lt;&equals;&gt;
:relfileprefix: ../
:mrdocs:

Perform a three&hyphen;way comparison of the operands&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;optional&period;h&gt;`

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

== Description

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;

== Return Value

result of the three&hyphen;way comparison

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lhs*
| left&hyphen;hand operand
| *rhs*
| right&hyphen;hand operand
|===


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