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

If `lhs` and `rhs` are not valueless by exception and hold the same alternative `i`, return `get(lhs) &lt;&equals;&gt; get(rhs)` &period; If `lhs` and `rhs` are not valueless by exception and hold the aalternatives `i` and `j` respectively, return `i&lt;&equals;&gt;j`&period; Return `strong&lowbar;ordering&colon;&colon;equal` if both variants are valueless by exception&period; Return `strong&lowbar;ordering&colon;&colon;less` if `lhs` is valueless by exception&period; Return `strong&lowbar;ordering&colon;&colon;greater` if `rhs` is valueless by exception&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class&period;&period;&period; t&lowbar;ALTS&gt;
requires (std&colon;&colon;three&lowbar;way&lowbar;comparable&lt;t&lowbar;ALTS&gt; &amp;&amp; &period;&period;&period;)
constexpr
std::common&lowbar;comparison&lowbar;category&lowbar;t&lt;std::compare&lowbar;three&lowbar;way&lowbar;result&lowbar;t&lt;t&lowbar;ALTS&gt;&period;&period;&period;&gt;
operator&lt;&equals;&gt;(
    xref:bsl/variant.adoc[variant&lt;t&lowbar;ALTS&period;&period;&period;&gt;] const& lhs,
    xref:bsl/variant.adoc[variant&lt;t&lowbar;ALTS&period;&period;&period;&gt;] const& rhs);
----


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