commit 42de03eb86970231c904da5c88d0863130aaa328 parent 1c0203e0cd1f997fcf1238ee5b759926a1a980a3 Author: Michael Savage <mikejsavage@gmail.com> Date: Sat Dec 3 16:09:39 +0200 Always pass two args to static_assert Diffstat:
intrinsics.h | | | 4 | +--- |
diff --git a/intrinsics.h b/intrinsics.h @@ -129,12 +129,10 @@ inline void mike_assert( const bool predicate, const char * message ) { #define assert( predicate ) mike_assert( predicate, "\x1b[1;31massertion failed at " __FILE__ " line " STRINGIFY( __LINE__ ) ": \x1b[0;1m" #predicate "\x1b[0m" ) #define ASSERT assert -#if COMPILER_MSVC +#if COMPILER_MSVC || __cplusplus >= 201103L #define STATIC_ASSERT( p ) static_assert( p, #p ) #elif __cplusplus < 201103L #define STATIC_ASSERT( p ) static int CONCAT( STATIC_ASSERT, __COUNTER__ )[ int( p ) - 1 ] -#else -#define STATIC_ASSERT( p ) static_assert( p ) #endif template< typename F >