From 87d0d73d1b0081662c2b8886c7914ee48176971e Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 10 Oct 2024 22:40:49 +0200 Subject: [PATCH] fix: MSVC bug workaround --- src/core/include/mp-units/framework/unit.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/include/mp-units/framework/unit.h b/src/core/include/mp-units/framework/unit.h index 804890ac..ed58a7e5 100644 --- a/src/core/include/mp-units/framework/unit.h +++ b/src/core/include/mp-units/framework/unit.h @@ -206,8 +206,9 @@ struct unit_interface { return is_same_v; } - [[nodiscard]] friend consteval bool equivalent(Unit auto lhs, Unit auto rhs) - requires(convertible(lhs, rhs)) + template + requires(convertible(Lhs{}, Rhs{})) + [[nodiscard]] friend consteval bool equivalent(Lhs lhs, Rhs rhs) { return get_canonical_unit(lhs).mag == get_canonical_unit(rhs).mag; }