mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-06 13:44: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:
@@ -362,11 +362,11 @@ public:
|
||||
}
|
||||
template<typename Value>
|
||||
[[nodiscard]] friend constexpr Quantity auto operator-(const Value& lhs, const quantity& rhs)
|
||||
requires requires {
|
||||
requires requires { // TODO: Simplify when Clang catches up.
|
||||
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<>, Value, rep>;
|
||||
} // when Clang catches up.
|
||||
}
|
||||
{
|
||||
return units::quantity(lhs - rhs.number());
|
||||
}
|
||||
|
Reference in New Issue
Block a user