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

Modulus operators

== Synopses

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    std::derived&lowbar;from&lt;quantity&gt; Q,
    xref:mp_units/RepresentationOf.adoc[RepresentationOf&lt;quantity&lowbar;spec&gt;] Value&gt;
requires detail&colon;&colon;DimensionlessOne&lt;Q&colon;&colon;reference&gt; &amp;&amp;
             detail&colon;&colon;InvokeResultOf&lt;quantity&lowbar;spec, std&colon;&colon;modulus&lt;&gt;, Rep, const Value&amp;&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/Quantity.adoc[Quantity] auto
xref:mp_units/operator_mod-09.adoc[operator%](
    Q const& lhs,
    Value const& rhs);
----

[.small]#xref:mp_units/operator_mod-09.adoc[_» more&period;&period;&period;_]#


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    std::derived&lowbar;from&lt;quantity&gt; Q,
    xref:mp_units/RepresentationOf.adoc[RepresentationOf&lt;quantity&lowbar;spec&gt;] Value&gt;
requires detail&colon;&colon;DimensionlessOne&lt;Q&colon;&colon;reference&gt; &amp;&amp;
             detail&colon;&colon;InvokeResultOf&lt;quantity&lowbar;spec, std&colon;&colon;modulus&lt;&gt;, Rep, const Value&amp;&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/Quantity.adoc[Quantity] auto
xref:mp_units/operator_mod-0d.adoc[operator%](
    Value const& lhs,
    Q const& rhs);
----

[.small]#xref:mp_units/operator_mod-0d.adoc[_» more&period;&period;&period;_]#


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    std::derived&lowbar;from&lt;quantity&gt; Q,
    auto R2,
    typename Rep2&gt;
requires (!treat&lowbar;as&lowbar;floating&lowbar;point&lt;Rep&gt;) &amp;&amp; (!treat&lowbar;as&lowbar;floating&lowbar;point&lt;Rep2&gt;) &amp;&amp;
            detail&colon;&colon;CommonlyInvocableQuantities&lt;std&colon;&colon;modulus&lt;&gt;, quantity, quantity&lt;R2, Rep2&gt;&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/Quantity.adoc[Quantity] auto
xref:mp_units/operator_mod-05.adoc[operator%](
    Q const& lhs,
    xref:mp_units/quantity-01.adoc[quantity&lt;R2, Rep2&gt;] const& rhs);
----

[.small]#xref:mp_units/operator_mod-05.adoc[_» more&period;&period;&period;_]#


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