mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 02:17:16 +02:00
@ -228,22 +228,17 @@ public:
|
|||||||
q_ %= rhs;
|
q_ %= rhs;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
template<typename Rep2>
|
|
||||||
constexpr quantity_kind& operator%=(const quantity_kind<downcast_kind<K, dim_one>, units::one, Rep2>& rhs)
|
template<QuantityKind QK>
|
||||||
requires requires(quantity_type q) { q %= rhs.common(); }
|
constexpr quantity_kind& operator%=(const QK& rhs)
|
||||||
|
requires (QuantityKindEquivalentTo<QK, quantity_kind> || std::same_as<typename QK::kind_type, downcast_kind<K, dim_one>>) &&
|
||||||
|
requires(quantity_type q) { q %= rhs.common(); }
|
||||||
{
|
{
|
||||||
|
gsl_ExpectsAudit(rhs.common().number() != quantity_values<typename QK::rep>::zero());
|
||||||
q_ %= rhs.common();
|
q_ %= rhs.common();
|
||||||
return *this;
|
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<rep>::zero());
|
|
||||||
q_ %= qk.common();
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hidden Friends
|
// Hidden Friends
|
||||||
// Below friend functions are to be found via argument-dependent lookup only
|
// Below friend functions are to be found via argument-dependent lookup only
|
||||||
template<Representation Value>
|
template<Representation Value>
|
||||||
|
Reference in New Issue
Block a user