Skip to content

Commit 51d0f56

Browse files
gregmarrhsutterMatthieuHernandez
authored
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 <[email protected]> * Update include/cpp2util.h Co-authored-by: Matthieu HERNANDEZ <[email protected]> Signed-off-by: Herb Sutter <[email protected]> --------- Signed-off-by: gregmarr <[email protected]> Signed-off-by: Herb Sutter <[email protected]> Co-authored-by: Herb Sutter <[email protected]> Co-authored-by: Matthieu HERNANDEZ <[email protected]>
1 parent 97ba0be commit 51d0f56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/cpp2util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ constexpr auto gcc_clang_msvc_min_versions(
368368
}
369369

370370

371-
#if defined(_MSC_VER)
371+
#if defined(_MSC_VER) && !defined(__clang_major__)
372372
// MSVC can't handle 'inline constexpr' variables yet in all cases
373373
#define CPP2_CONSTEXPR const
374374
#else

0 commit comments

Comments
 (0)