From c148fffd956950e7b0fe18edfcc592c16a071bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Sun, 21 Feb 2021 15:59:00 -0400 Subject: [PATCH] test: compile quantity_point_test.cpp --- src/include/units/quantity_point.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/units/quantity_point.h b/src/include/units/quantity_point.h index e2253ca6..288ed72f 100644 --- a/src/include/units/quantity_point.h +++ b/src/include/units/quantity_point.h @@ -134,7 +134,7 @@ public: template [[nodiscard]] friend constexpr QuantityPoint auto operator+(const quantity_point& lhs, const Q& rhs) - requires requires { lhs.relative() + rhs; } + requires requires(quantity_type q) { q + rhs; } { const auto q = lhs.relative() + rhs; using q_type = decltype(q); @@ -150,7 +150,7 @@ public: template [[nodiscard]] friend constexpr QuantityPoint auto operator-(const quantity_point& lhs, const Q& rhs) - requires requires { lhs.relative() - rhs; } + requires requires(quantity_type q) { q - rhs; } { const auto q = lhs.relative() - rhs; using q_type = decltype(q); @@ -159,7 +159,7 @@ public: template [[nodiscard]] friend constexpr Quantity auto operator-(const quantity_point& lhs, const QP& rhs) - requires requires { lhs.relative() - rhs.relative(); } + requires requires(quantity_type q) { q - rhs.relative(); } { return lhs.relative() - rhs.relative(); }