[#mp_units-operator_mod-01] = xref:mp_units.adoc[mp_units]::operator% :relfileprefix: ../ :mrdocs: Modulus operators == Synopses Declared in `<mp‐units/framework/quantity.h>` Modulus operator [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< auto R1, typename Rep1, xref:mp_units/RepresentationOf.adoc[RepresentationOf<get_quantity_spec(R1)>] Value> requires ImplicitFromNumber<R1> && InvokeResultOf<get_quantity_spec(R1), std::modulus<>, Rep1, const Value&> [[nodiscard]] constexpr xref:mp_units/Quantity-0c.adoc[Quantity] auto xref:mp_units/operator_mod-03.adoc[operator%]( Value const& lhs, xref:mp_units/quantity-01.adoc[quantity<R1, Rep1>] const& rhs); ---- [.small]#xref:mp_units/operator_mod-03.adoc[_» more..._]# Modulus operator [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< auto R1, typename Rep1, xref:mp_units/RepresentationOf.adoc[RepresentationOf<get_quantity_spec(R1)>] Value> requires ImplicitFromNumber<R1> && InvokeResultOf<get_quantity_spec(R1), std::modulus<>, Rep1, const Value&> [[nodiscard]] constexpr xref:mp_units/Quantity-0c.adoc[Quantity] auto xref:mp_units/operator_mod-0e.adoc[operator%]( xref:mp_units/quantity-01.adoc[quantity<R1, Rep1>] const& lhs, Value const& rhs); ---- [.small]#xref:mp_units/operator_mod-0e.adoc[_» more..._]# Modulus operator [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< auto R1, typename Rep1, auto R2, typename Rep2> requires (!treat_as_floating_point<Rep1>) && (!treat_as_floating_point<Rep2>) && CommonlyInvocableQuantities<std::modulus<>, quantity<R1, Rep1>, quantity<R2, Rep2>> [[nodiscard]] constexpr xref:mp_units/Quantity-0c.adoc[Quantity] auto xref:mp_units/operator_mod-04.adoc[operator%]( xref:mp_units/quantity-01.adoc[quantity<R1, Rep1>] const& lhs, xref:mp_units/quantity-01.adoc[quantity<R2, Rep2>] const& rhs); ---- [.small]#xref:mp_units/operator_mod-04.adoc[_» more..._]# == Return Value [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== [.small]#Created with https://www.mrdocs.com[MrDocs]#