forked from mpusz/mp-units
refactor: quantity::count() renamed to quantity::number()
Resolves #259
This commit is contained in:
@@ -232,7 +232,7 @@ public:
|
||||
constexpr quantity_kind& operator%=(const quantity_kind& qk)
|
||||
requires requires(quantity_type q) { q %= qk.common(); }
|
||||
{
|
||||
gsl_ExpectsAudit(qk.common().count() != quantity_values<rep>::zero());
|
||||
gsl_ExpectsAudit(qk.common().number() != quantity_values<rep>::zero());
|
||||
q_ %= qk.common();
|
||||
return *this;
|
||||
}
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
[[nodiscard]] friend constexpr QuantityKind auto operator/(const Value& v, const quantity_kind& qk)
|
||||
requires requires(quantity_type q) { { v / q } -> Quantity; }
|
||||
{
|
||||
gsl_ExpectsAudit(qk.common().count() != quantity_values<rep>::zero());
|
||||
gsl_ExpectsAudit(qk.common().number() != quantity_values<rep>::zero());
|
||||
return detail::downcasted_kind<quantity_kind>(v / qk.common());
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ template<QuantityKind QK, Quantity Q>
|
||||
[[nodiscard]] constexpr QuantityKind auto operator/(const QK& lhs, const Q& rhs)
|
||||
requires requires { lhs.common() / rhs; }
|
||||
{
|
||||
gsl_ExpectsAudit(rhs.count() != quantity_values<typename Q::rep>::zero());
|
||||
gsl_ExpectsAudit(rhs.number() != quantity_values<typename Q::rep>::zero());
|
||||
return detail::downcasted_kind<QK>(lhs.common() / rhs);
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ template<Quantity Q, QuantityKind QK>
|
||||
[[nodiscard]] constexpr QuantityKind auto operator/(const Q& lhs, const QK& rhs)
|
||||
requires requires { lhs / rhs.common(); }
|
||||
{
|
||||
gsl_ExpectsAudit(rhs.common().count() != quantity_values<typename QK::rep>::zero());
|
||||
gsl_ExpectsAudit(rhs.common().number() != quantity_values<typename QK::rep>::zero());
|
||||
return detail::downcasted_kind<QK>(lhs / rhs.common());
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ template<QuantityKind QK, Dimensionless D>
|
||||
[[nodiscard]] constexpr QuantityKind auto operator%(const QK& lhs, const D& rhs)
|
||||
requires requires { lhs.common() % rhs; }
|
||||
{
|
||||
gsl_ExpectsAudit(rhs.count() != quantity_values<typename D::rep>::zero());
|
||||
gsl_ExpectsAudit(rhs.number() != quantity_values<typename D::rep>::zero());
|
||||
return detail::make_quantity_kind<QK>(lhs.common() % rhs);
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ template<QuantityKind QK1, QuantityKindEquivalentTo<QK1> QK2>
|
||||
[[nodiscard]] constexpr QuantityKind auto operator%(const QK1& lhs, const QK2& rhs)
|
||||
requires requires { lhs.common() % rhs.common(); }
|
||||
{
|
||||
gsl_ExpectsAudit(rhs.common().count() != quantity_values<typename QK2::rep>::zero());
|
||||
gsl_ExpectsAudit(rhs.common().number() != quantity_values<typename QK2::rep>::zero());
|
||||
return detail::make_quantity_kind<QK1>(lhs.common() % rhs.common());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user