[#beman-optional-operator_3way-08]
= xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::operator&lt;&equals;&gt;
:relfileprefix: ../../
:mrdocs:

Three&hyphen;way comparison operator

== Synopsis

Declared in `&lt;beman&sol;optional&sol;optional&period;hpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename T,
    typename U&gt;
requires (!is&lowbar;derived&lowbar;from&lowbar;optional&lt;U&gt;) &amp;&amp; std&colon;&colon;three&lowbar;way&lowbar;comparable&lowbar;with&lt;T, U&gt;
constexpr
std::compare&lowbar;three&lowbar;way&lowbar;result&lowbar;t&lt;T, U&gt;
operator&lt;&equals;&gt;(
    xref:beman/optional/optional-03.adoc[optional&lt;T&gt;] const& x,
    U const& v);
----

== Return Value

The relative order of the objects

== Parameters

[cols="1,4"]
|===
| Name| Description
| *x*
| The left operand
| *v*
| The right operand
|===


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