[#mp_units-operator_mod-0e]
= xref:mp_units.adoc[mp&lowbar;units]::operator%
:relfileprefix: ../
:mrdocs:

Modulus operator

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/safe_int-09.adoc[safe&lowbar;int&lt;&sol;&ast; implementation-defined &ast;&sol;, ErrorPolicy&gt;]
operator%(
    xref:mp_units/safe_int-09.adoc[safe&lowbar;int] lhs,
    xref:mp_units/safe_int-09.adoc[safe&lowbar;int] rhs);
----

== Return Value

Wraps an integral type with overflow detection&period;

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

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


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