Changeset - r22785:813e350241eb
[Not reviewed]
master
0 1 0
Charles Pigott - 7 years ago 2018-04-11 11:36:45
charlespigott@googlemail.com
Codechange: Simplify C++11 check for assert_compile
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/stdafx.h
Show inline comments
 
@@ -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__)
0 comments (0 inline, 0 general)