[#mp_units-utility-operator_3way-097]
= xref:mp_units.adoc[mp&lowbar;units]::xref:mp_units/utility.adoc[utility]::operator&lt;&equals;&gt;
:relfileprefix: ../../
:mrdocs:

Compares a `safe&lowbar;int` with an integral scalar, comparing safely across signedness&period;

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;utility&sol;safe&lowbar;int&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
std::strong&lowbar;ordering
operator&lt;&equals;&gt;(
    xref:mp_units/utility/safe_int-07.adoc[safe&lowbar;int] lhs,
    U rhs);
----

== Return Value

the ordering between the wrapped value and `rhs`

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Template Parameters

[cols="1,4"]
|===
| Name| Description
| *U*
| the integral scalar type
|===

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lhs*
| the `safe&lowbar;int` operand
| *rhs*
| the integral scalar to compare against
|===


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