Skip to content

Commit 8f58dce

Browse files
pablogsalAA-Turner
andcommitted
Apply suggestions from code review
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent 8e3132d commit 8f58dce

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Include/pymacro.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212

1313
// static_assert is defined in glibc from version 2.16. Before it requires
1414
// compiler support (gcc >= 4.6) and is called _Static_assert.
15+
// In C++ 11 static_assert is a keyword, redefining is undefined behaviour.
1516
#if (defined(__GLIBC__) \
1617
&& (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 16)) \
17-
&& !defined(static_assert) && !(defined(__cplusplus) && __cplusplus >= 201103L))
18+
&& !(defined(__cplusplus) && __cplusplus >= 201103L) \
19+
&& !defined(static_assert))
1820
# define static_assert _Static_assert
1921
#endif
2022

0 commit comments

Comments
 (0)