CrossFramework Library
|
00001 00006 #if defined(XBASE_INCLUDED_STATICASSERT_HPP) 00007 #else 00008 #define XBASE_INCLUDED_STATICASSERT_HPP 00009 00010 //----------------------------------------------------------- 00011 #include <XBase/Compiler.hpp> 00012 00013 //------------------------------------------------------------ 00015 00016 00017 00018 00024 #if defined(XBASE_COMPILER_MSVC) 00025 #define XBASE_STATIC_ASSERT_MSG( aCond , aMsg ) static_assert( aCond , aMsg ) 00026 #else 00027 #define XBASE_STATIC_ASSERT_MSG( aCond , aMsg ) 00028 #endif 00029 00034 #define XBASE_STATIC_ASSERT( aCond ) XBASE_STATIC_ASSERT_MSG( aCond , "Static assert failure." ) 00035 00037 #define XBASE_STATIC_ASSERT_FAILURE XBASE_STATIC_ASSERT_MSG( false ) 00038 00040 00041 //----------------------------------------------------------- 00042 #endif 00043 // EOF 00044