From 417f84258523d2e5f868cf080b7b837328edd501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Fri, 17 Sep 2021 08:58:15 -0400 Subject: [PATCH] fix: constraint recursion for GCC 11 --- src/core/include/units/quantity.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/core/include/units/quantity.h b/src/core/include/units/quantity.h index 75d81d5f..3d47d440 100644 --- a/src/core/include/units/quantity.h +++ b/src/core/include/units/quantity.h @@ -312,18 +312,16 @@ public: return units::quantity(lhs - rhs.number()); } - template - requires (!Quantity) && - invoke_result_convertible_to_, rep, const Value&> + template + requires invoke_result_convertible_to_, rep, const Value&> [[nodiscard]] friend constexpr Quantity auto operator*(const quantity& q, const Value& v) { using ret = quantity, rep, Value>>; return ret(q.number() * v); } - template - requires (!Quantity) && - invoke_result_convertible_to_, const Value&, rep> + template + requires invoke_result_convertible_to_, const Value&, rep> [[nodiscard]] friend constexpr Quantity auto operator*(const Value& v, const quantity& q) { using ret = quantity, Value, rep>>;