Update src/core/include/units/quantity.h

Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
This commit is contained in:
Mateusz Pusz
2022-03-18 08:20:08 +01:00
committed by GitHub
parent c6f35b0231
commit 6e59e7a927

View File

@@ -331,11 +331,11 @@ public:
// Below friend functions are to be found via argument-dependent lookup only
template<typename Value>
[[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 is_same_v<unit, units::one>; // TODO: Simplify
requires is_same_v<unit, units::one>;
requires invoke_result_convertible_to_<rep, std::plus<>, rep, Value>;
} // when Clang catches up.
}
{
return units::quantity(lhs.number() + rhs);
}