From: Bruno Haible Date: Wed, 14 Sep 2022 11:35:14 +0000 (+0200) Subject: verify: Avoid syntax error due to static_assert with MSVC 14. X-Git-Tag: v1.0~2023 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=7ea156f06cea2b6e225754c475f17035a38de5b2;p=gnulib.git verify: Avoid syntax error due to static_assert with MSVC 14. * lib/verify.h (_Static_assert): Pass only the first argument to _GL_VERIFY. --- diff --git a/ChangeLog b/ChangeLog index 2e04ffd8d1..24c734cca6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2022-09-14 Bruno Haible + + 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 verify: treat GNU C++ 6 like recent C++ diff --git a/lib/verify.h b/lib/verify.h index 154a5b76bf..a0d597f3d4 100644 --- a/lib/verify.h +++ b/lib/verify.h @@ -223,8 +223,8 @@ template /* _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 \