From 51d0f564cf7a1710c9f773a028558cbc5a0a64d3 Mon Sep 17 00:00:00 2001 From: gregmarr Date: Wed, 9 Oct 2024 20:33:40 -0400 Subject: [PATCH] Exclude MSVC workaround on clang and gcc (#1306) * Exclude MSVC workaround on clang and gcc Resolves #1304 On Windows, clang defines `_MSC_VER`, so the MSVC workaround needs to not happen when the clang define is set. Signed-off-by: gregmarr * Update include/cpp2util.h Co-authored-by: Matthieu HERNANDEZ <25429726+MatthieuHernandez@users.noreply.github.com> Signed-off-by: Herb Sutter --------- Signed-off-by: gregmarr Signed-off-by: Herb Sutter Co-authored-by: Herb Sutter Co-authored-by: Matthieu HERNANDEZ <25429726+MatthieuHernandez@users.noreply.github.com> --- include/cpp2util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cpp2util.h b/include/cpp2util.h index 2015e64441..ebedeb5fb2 100644 --- a/include/cpp2util.h +++ b/include/cpp2util.h @@ -368,7 +368,7 @@ constexpr auto gcc_clang_msvc_min_versions( } -#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined(__clang_major__) // MSVC can't handle 'inline constexpr' variables yet in all cases #define CPP2_CONSTEXPR const #else