diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2018-04-11 12:36:45 +0100 |
---|---|---|
committer | frosch <github@elsenhans.name> | 2018-04-11 18:24:19 +0200 |
commit | dd6b82d6b200b48f8e39aa1923ec7ba260c7e87f (patch) | |
tree | 2606c838374c4e54caf7e5c3f449db50a05a13f0 | |
parent | e61435774b7c0f6888f5dfc741e616866194661e (diff) | |
download | openttd-dd6b82d6b200b48f8e39aa1923ec7ba260c7e87f.tar.xz |
Codechange: Simplify C++11 check for assert_compile
-rw-r--r-- | src/stdafx.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/stdafx.h b/src/stdafx.h index 237ead346..6c59d7f20 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -383,8 +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) || (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 */ +#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600) #define assert_compile(expr) static_assert(expr, #expr ) #define assert_tcompile(expr) assert_compile(expr) #elif defined(__OS2__) |