forked from mpusz/mp-units
Update src/core/include/units/quantity.h
Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
This commit is contained in:
@@ -341,11 +341,11 @@ public:
|
|||||||
}
|
}
|
||||||
template<typename Value>
|
template<typename Value>
|
||||||
[[nodiscard]] friend constexpr Quantity auto operator+(const Value& lhs, const quantity& rhs)
|
[[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 !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::plus<>, Value, rep>;
|
requires invoke_result_convertible_to_<rep, std::plus<>, Value, rep>;
|
||||||
} // when Clang catches up.
|
}
|
||||||
{
|
{
|
||||||
return units::quantity(lhs + rhs.number());
|
return units::quantity(lhs + rhs.number());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user