forked from mpusz/mp-units
Merge branch 'master' of github.com:mpusz/units
This commit is contained in:
@@ -210,6 +210,13 @@ public:
|
||||
value_ *= rhs;
|
||||
return *this;
|
||||
}
|
||||
template<typename Rep2>
|
||||
constexpr quantity& operator*=(const dimensionless<units::one, Rep2>& rhs)
|
||||
requires requires(rep a, const Rep2 b) { { a *= b } -> std::same_as<rep&>; }
|
||||
{
|
||||
value_ *= rhs.count();
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename Rep2>
|
||||
constexpr quantity& operator/=(const Rep2& rhs)
|
||||
@@ -218,6 +225,13 @@ public:
|
||||
value_ /= rhs;
|
||||
return *this;
|
||||
}
|
||||
template<typename Rep2>
|
||||
constexpr quantity& operator/=(const dimensionless<units::one, Rep2>& rhs)
|
||||
requires requires(rep a, const Rep2 b) { { a /= b } -> std::same_as<rep&>; }
|
||||
{
|
||||
value_ /= rhs.count();
|
||||
return *this;
|
||||
}
|
||||
|
||||
constexpr quantity& operator%=(const rep& rhs)
|
||||
requires (!floating_point_<rep>) &&
|
||||
|
||||
Reference in New Issue
Block a user