mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-06 05:34:27 +02:00
Merge pull request #399 from TheCoconutChef/missing-fixes-for-division-op-in-gcc11
fix: constraint recursion for gcc11 on operator/
This commit is contained in:
@@ -392,8 +392,8 @@ public:
|
||||
return ret(v * q.number());
|
||||
}
|
||||
|
||||
template<typename Value>
|
||||
requires(!Quantity<Value>) && (invoke_result_convertible_to_<rep, std::divides<>, rep, const Value&>)
|
||||
template<Representation Value>
|
||||
requires(invoke_result_convertible_to_<rep, std::divides<>, rep, const Value&>)
|
||||
[[nodiscard]] friend constexpr Quantity auto operator/(const quantity& q, const Value& v)
|
||||
{
|
||||
gsl_ExpectsAudit(v != quantity_values<Value>::zero());
|
||||
@@ -401,8 +401,8 @@ public:
|
||||
return ret(q.number() / v);
|
||||
}
|
||||
|
||||
template<typename Value>
|
||||
requires(!Quantity<Value>) && (invoke_result_convertible_to_<rep, std::divides<>, const Value&, rep>)
|
||||
template<Representation Value>
|
||||
requires(invoke_result_convertible_to_<rep, std::divides<>, const Value&, rep>)
|
||||
[[nodiscard]] friend constexpr Quantity auto operator/(const Value& v, const quantity& q)
|
||||
{
|
||||
return detail::make_quantity<::units::reference<dim_one, ::units::one>{} / reference>(v / q.number());
|
||||
|
Reference in New Issue
Block a user