mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-07 14:14:27 +02:00
Update src/core/include/units/quantity.h
Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
This commit is contained in:
@@ -352,11 +352,11 @@ public:
|
|||||||
|
|
||||||
template<typename Value>
|
template<typename Value>
|
||||||
[[nodiscard]] friend constexpr Quantity auto operator-(const quantity& lhs, const Value& rhs)
|
[[nodiscard]] friend constexpr Quantity auto operator-(const quantity& lhs, const Value& rhs)
|
||||||
requires requires {
|
requires requires { // TODO: Simplify when Clang catches up.
|
||||||
requires !Quantity<Value>;
|
requires !Quantity<Value>;
|
||||||
requires is_same_v<unit, units::one>; // TODO: Simplify
|
requires is_same_v<unit, units::one>;
|
||||||
requires invoke_result_convertible_to_<rep, std::minus<>, rep, Value>;
|
requires invoke_result_convertible_to_<rep, std::minus<>, rep, Value>;
|
||||||
} // when Clang catches up.
|
}
|
||||||
{
|
{
|
||||||
return units::quantity(lhs.number() - rhs);
|
return units::quantity(lhs.number() - rhs);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user