Merge pull request #4681 from equalsraf/tb-msvc-varmacros

MSVC: Avoid variadic macro bug in STATIC_ASSERT
This commit is contained in:
Justin M. Keyes
2016-05-01 09:42:17 -04:00

View File

@@ -46,10 +46,10 @@
#define STATIC_ASSERT_PRAGMA_START
#define STATIC_ASSERT_PRAGMA_END
#define STATIC_ASSERT(...) \
#define STATIC_ASSERT(cond, msg) \
do { \
STATIC_ASSERT_PRAGMA_START \
STATIC_ASSERT_STATEMENT(__VA_ARGS__); \
STATIC_ASSERT_STATEMENT(cond, msg); \
STATIC_ASSERT_PRAGMA_END \
} while (0)