From 19dd181b6f58d1a02bf66c3d8e18ac2dd21211e0 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Wed, 31 May 2017 17:09:43 +0300 Subject: [PATCH] mdbx: fix STATIC_ASSERT for MSVC. --- src/defs.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/defs.h b/src/defs.h index 5e3db8cb..6ef6e35a 100644 --- a/src/defs.h +++ b/src/defs.h @@ -375,6 +375,9 @@ # define STATIC_ASSERT_MSG(expr, msg) _Static_assert(expr, msg) # elif defined(static_assert) # define STATIC_ASSERT_MSG(expr, msg) static_assert(expr, msg) +# elif defined(_MSC_VER) +# include +# define STATIC_ASSERT_MSG(expr, msg) _STATIC_ASSERT(expr) # else # define STATIC_ASSERT_MSG(expr, msg) switch (0) {case 0:case (expr):;} # endif