refactor: inverse() constraints improved
This commit is contained in:
1 parent
06cbfae3b3
commit
71917a41dc
1 file changed
+1
-1
@@ -447,7 +447,7 @@ template<Unit auto To, auto R, typename Rep>
|
||||
[[nodiscard]] constexpr QuantityOf<dimensionless / get_quantity_spec(R)> auto inverse(const quantity<R, Rep>& q)
|
||||
requires requires {
|
||||
representation_values<Rep>::one();
|
||||
value_cast<To>(1 / q);
|
||||
value_cast<To>(representation_values<Rep>::one() / q);
|
||||
}
|
||||
{
|
||||
return (representation_values<Rep>::one() * one).force_in(To * quantity<R, Rep>::unit) / q;
|
||||
|
||||
Reference in new issue
Block a user