ソースを参照

Merge pull request #556 from ColdenCullen/master

#394: static_assert on Windows with Clang
bel2125 7 年 前
コミット
4b9d123228
1 ファイル変更3 行追加5 行削除
  1. 3 5
      src/civetweb.c

+ 3 - 5
src/civetweb.c

@@ -77,12 +77,10 @@
 /* This code uses static_assert to check some conditions.
  * Unfortunately some compilers still do not support it, so we have a
  * 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
+#elif defined(__cplusplus) && __cplusplus >= 201103L
+#define mg_static_assert static_assert
 #else
 char static_assert_replacement[1];
 #define mg_static_assert(cond, txt)                                            \