|
@@ -77,12 +77,10 @@
|
|
/* This code uses static_assert to check some conditions.
|
|
/* This code uses static_assert to check some conditions.
|
|
* Unfortunately some compilers still do not support it, so we have a
|
|
* Unfortunately some compilers still do not support it, so we have a
|
|
* replacement function here. */
|
|
* replacement function here. */
|
|
-#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
|
|
|
-#define mg_static_assert static_assert
|
|
|
|
-#elif defined(__cplusplus) && (__cplusplus >= 201103L)
|
|
|
|
-#define mg_static_assert static_assert
|
|
|
|
-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
|
|
|
|
|
|
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201100L
|
|
#define mg_static_assert _Static_assert
|
|
#define mg_static_assert _Static_assert
|
|
|
|
+#elif defined(__cplusplus) && __cplusplus >= 201103L
|
|
|
|
+#define mg_static_assert static_assert
|
|
#else
|
|
#else
|
|
char static_assert_replacement[1];
|
|
char static_assert_replacement[1];
|
|
#define mg_static_assert(cond, txt) \
|
|
#define mg_static_assert(cond, txt) \
|