diff --git a/src/core/include/mp-units/framework/quantity.h b/src/core/include/mp-units/framework/quantity.h index 9933a760..d957cb14 100644 --- a/src/core/include/mp-units/framework/quantity.h +++ b/src/core/include/mp-units/framework/quantity.h @@ -448,7 +448,7 @@ public: } friend constexpr decltype(auto) operator*=(Q&& lhs, const Value& v) { - lhs.numerical_value_is_an_implementation_detail_ *= v; + lhs.numerical_value_is_an_implementation_detail_ = lhs.numerical_value_is_an_implementation_detail_ * v; return std::forward(lhs); } @@ -461,7 +461,8 @@ public: } friend constexpr decltype(auto) operator*=(Q1&& lhs, const Q2& rhs) { - lhs.numerical_value_is_an_implementation_detail_ *= rhs.numerical_value_is_an_implementation_detail_; + lhs.numerical_value_is_an_implementation_detail_ = lhs.numerical_value_is_an_implementation_detail_ * + rhs.numerical_value_is_an_implementation_detail_; return std::forward(lhs); } @@ -475,7 +476,7 @@ public: friend constexpr decltype(auto) operator/=(Q&& lhs, const Value& v) { MP_UNITS_EXPECTS_DEBUG(v != quantity_values::zero()); - lhs.numerical_value_is_an_implementation_detail_ /= v; + lhs.numerical_value_is_an_implementation_detail_ = lhs.numerical_value_is_an_implementation_detail_ / v; return std::forward(lhs); } @@ -489,7 +490,8 @@ public: friend constexpr decltype(auto) operator/=(Q1&& lhs, const Q2& rhs) { MP_UNITS_EXPECTS_DEBUG(rhs != rhs.zero()); - lhs.numerical_value_is_an_implementation_detail_ /= rhs.numerical_value_is_an_implementation_detail_; + lhs.numerical_value_is_an_implementation_detail_ = lhs.numerical_value_is_an_implementation_detail_ + / rhs.numerical_value_is_an_implementation_detail_; return std::forward(lhs); }