From 24a1b82840f108bbca0704bc793f9646a52a9d0e Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 24 Sep 2017 13:35:27 +0000 Subject: (svn r27916) -Codechange: Enable usage of static_assert for MSVC --- src/stdafx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stdafx.h') diff --git a/src/stdafx.h b/src/stdafx.h index 43e52ff27..237ead346 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -383,7 +383,7 @@ typedef unsigned char byte; /* Compile time assertions. Prefer c++0x static_assert(). * Older compilers cannot evaluate some expressions at compile time, * typically when templates are involved, try assert_tcompile() in those cases. */ -#if defined(__STDCXX_VERSION__) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(static_assert) +#if defined(__STDCXX_VERSION__) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(static_assert) || (defined(_MSC_VER) && _MSC_VER >= 1600) /* __STDCXX_VERSION__ is c++0x feature macro, __GXX_EXPERIMENTAL_CXX0X__ is used by gcc, __GXX_EXPERIMENTAL_CPP0X__ by icc */ #define assert_compile(expr) static_assert(expr, #expr ) #define assert_tcompile(expr) assert_compile(expr) -- cgit v1.2.3-54-g00ecf