From eaed0614ef57301887952bd28e97a39f0abfa6dc Mon Sep 17 00:00:00 2001 From: Jonas Hoppe <162709928+czjhoppe@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:29:50 +0200 Subject: [PATCH] [msvc][fix][unit.h] move requires before function signature instead of using MP_UNITS_IS_CONST_EXPR_WORKAROUND --- src/core/include/mp-units/framework/unit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/include/mp-units/framework/unit.h b/src/core/include/mp-units/framework/unit.h index 7512ba01..83479c49 100644 --- a/src/core/include/mp-units/framework/unit.h +++ b/src/core/include/mp-units/framework/unit.h @@ -632,8 +632,8 @@ template [[nodiscard]] consteval Unit auto common_unit(Unit auto u) { return u; } template +requires(convertible(U1{}, U2{})) [[nodiscard]] consteval Unit auto common_unit(U1 u1, U2 u2) - requires(convertible(MP_UNITS_IS_CONST_EXPR_WORKAROUND(u1), MP_UNITS_IS_CONST_EXPR_WORKAROUND(u2))) { if constexpr (is_same_v) return u1;