[#mp_units-quantity-01-operator_mod_eq]
= xref:mp_units.adoc[mp&lowbar;units]::xref:mp_units/quantity-01.adoc[quantity]::operator%&equals;
:relfileprefix: ../../
:mrdocs:

Modulus assignment operator

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;framework&sol;quantity&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    auto R2,
    typename Rep2&gt;
requires (!treat&lowbar;as&lowbar;floating&lowbar;point&lt;rep&gt;) &amp;&amp;
            (mp&lowbar;units&colon;&colon;implicitly&lowbar;convertible(get&lowbar;quantity&lowbar;spec(R2), quantity&lowbar;spec)) &amp;&amp;
            detail&colon;&colon;ImplicitConversion&lt;get&lowbar;unit(R2), Rep2, unit, rep&gt; &amp;&amp; requires(rep&amp; a, const Rep2 b) &lcub;
              &lcub; a %&equals; b &rcub; &hyphen;&gt; std&colon;&colon;same&lowbar;as&lt;rep&amp;&gt;&semi;
            &rcub;
constexpr
xref:mp_units/quantity-01.adoc[quantity]&
operator%&equals;(xref:mp_units/quantity-01.adoc[quantity&lt;R2, Rep2&gt;] const& other) &amp;;
----

== Return Value

Reference to the current object

== Parameters

[cols="1,4"]
|===
| Name| Description
| *other*
| The right operand
|===


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