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

ChangeLog
lib/verify.h

index 2e04ffd8d1e6f4d5b88c5bb94e3ac08d9a4d55be..24c734cca647ee013cc3bd95e17fe0a5bde07fcc 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  Paul Eggert  <eggert@cs.ucla.edu>
 
        verify: treat GNU C++ 6 like recent C++
index 154a5b76bfb447f71e3d94febca3a80cdd582f78..a0d597f3d44c7786679ca05f07983f1c82b48031 100644 (file)
@@ -223,8 +223,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 (!defined static_assert \
       && __STDC_VERSION__ < 202311 \