1 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3 * Contains custom assertion code.
5 * \author Pierre Terdiman
6 * \date January, 14, 2001
8 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
10 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
15 // Leave the {} so that you can write this kind of things safely in release mode:
16 // if(condition) ASSERT()
20 FUNCTION ICECORE_API bool CustomAssertFunction(int, char*, int, char*, bool&);
22 //! Custom ASSERT function. Various usages:
24 //! ASSERT(!"Not implemented")
25 //! ASSERT(condition && "error text")
28 static bool IgnoreAlways = false; \
31 if(CustomAssertFunction((int)(exp), #exp, __LINE__, __FILE__, IgnoreAlways)) \
38 #define ASSERT(exp) {}
46 #define ICE_COMPILE_TIME_ASSERT(exp) extern char ICE_Dummy[ (exp) ? 1 : -1 ]