]> Savannah Git Hosting - gnulib.git/commitdiff
verify: Avoid syntax error due to static_assert with MSVC 14.
authorBruno Haible <bruno@clisp.org>
Sun, 18 Sep 2022 19:14:35 +0000 (21:14 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 18 Sep 2022 19:14:35 +0000 (21:14 +0200)
* lib/verify.h (_Static_assert): Pass only the first argument to
_GL_VERIFY.

ChangeLog
lib/verify.h

index bf5cf676091584870f518d346d9fe30a0fa9750d..b8facecd31734e31f39d62bf364f730c9f9d2b0c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-09-14  Bruno Haible  <bruno@clisp.org>
+
+       verify: Avoid syntax error due to static_assert with MSVC 14.
+       * lib/verify.h (_Static_assert): Pass only the first argument to
+       _GL_VERIFY.
+
 2022-09-13  Bruno Haible  <bruno@clisp.org>
 
        verify: Avoid syntax error due to static_assert with GNU C++ 6.x.
index 7555b879e82a86faf6d0b1809071d5a0c675bbd4..dc99beed60b80f1b6c639ab17b4f3370dd5ae93e 100644 (file)
@@ -220,8 +220,8 @@ template <int w>
 /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h.  */
 #ifdef _GL_STATIC_ASSERT_H
 # if !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert
-#  define _Static_assert(...) \
-     _GL_VERIFY (__VA_ARGS__, "static assertion failed", -)
+#  define _Static_assert(R, ...) \
+     _GL_VERIFY ((R), "static assertion failed", -)
 # endif
 # if __cpp_static_assert < 201411 && __GNUG__ < 6 && !defined static_assert
 #  define static_assert _Static_assert /* C11 requires this #define.  */