Skip to content

Commit 0f889c6

Browse files
committed
Fix ZEND_STATIC_ASSERT for -std=c++17
(19169)
1 parent 86aaded commit 0f889c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Zend/zend_portability.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,9 @@ extern "C++" {
761761
/** @deprecated */
762762
#define ZEND_CGG_DIAGNOSTIC_IGNORED_END ZEND_DIAGNOSTIC_IGNORED_END
763763

764-
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
764+
#if defined(__cplusplus)
765+
# define ZEND_STATIC_ASSERT(c, m) static_assert((c), m)
766+
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
765767
# define ZEND_STATIC_ASSERT(c, m) _Static_assert((c), m)
766768
#else
767769
# define ZEND_STATIC_ASSERT(c, m)

0 commit comments

Comments
 (0)