Skip to content

mp_units::operator%

Modulus operators

Synopses

Declared in <mp-units/framework/quantity.h>

Modulus operator

template<auto R1, typename Rep1, RepresentationOf<get_quantity_spec(R1)> Value>
  requires ImplicitFromNumber<R1> && InvokeResultOf<get_quantity_spec(R1), std::modulus<>, Rep1, const Value&>
[[nodiscard]] constexpr Quantity auto operator%(Value const& lhs, quantity<R1, Rep1> const& rhs);

» more...

Modulus operator

template<auto R1, typename Rep1, RepresentationOf<get_quantity_spec(R1)> Value>
  requires ImplicitFromNumber<R1> && InvokeResultOf<get_quantity_spec(R1), std::modulus<>, Rep1, const Value&>
[[nodiscard]] constexpr Quantity auto operator%(quantity<R1, Rep1> const& lhs, Value const& rhs);

» more...

Modulus operator

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 Quantity auto operator%(quantity<R1, Rep1> const& lhs, quantity<R2, Rep2> const& rhs);

» more...

Return Value

Note

The return value should not be discarded.