diff --git a/src/core/include/units/quantity_kind.h b/src/core/include/units/quantity_kind.h index ccb4c1b6..50c3f785 100644 --- a/src/core/include/units/quantity_kind.h +++ b/src/core/include/units/quantity_kind.h @@ -228,22 +228,17 @@ public: q_ %= rhs; return *this; } - template - constexpr quantity_kind& operator%=(const quantity_kind, units::one, Rep2>& rhs) - requires requires(quantity_type q) { q %= rhs.common(); } + + template + constexpr quantity_kind& operator%=(const QK& rhs) + requires (QuantityKindEquivalentTo || std::same_as>) && + requires(quantity_type q) { q %= rhs.common(); } { + gsl_ExpectsAudit(rhs.common().number() != quantity_values::zero()); q_ %= rhs.common(); return *this; } - constexpr quantity_kind& operator%=(const quantity_kind& qk) - requires requires(quantity_type q) { q %= qk.common(); } - { - gsl_ExpectsAudit(qk.common().number() != quantity_values::zero()); - q_ %= qk.common(); - return *this; - } - // Hidden Friends // Below friend functions are to be found via argument-dependent lookup only template