mp_units::quantity::operator%=

Modulus assignment operator

Synopsis

Declared in <mp-units/framework/quantity.h>
template<
    auto R2,
    typename Rep2>
requires (!treat_as_floating_point<rep>) && (implicitly_convertible(get_quantity_spec(R2), quantity_spec)) &&
            detail::ValuePreservingConversion<get_unit(R2), Rep2, unit, rep> && requires(rep& a, const Rep2 b) {
              { a %= b } -> std::same_as<rep&>;
            }
constexpr
quantity&
operator%=(quantity<R2, Rep2> const& other) &;


Return Value

Reference to the current object

Parameters

Name Description
other The right operand

Created with MrDocs