Go to the documentation of this file.
30 #ifndef __CLAW_ASSERT_HPP__
31 #define __CLAW_ASSERT_HPP__
74 unsigned int line,
bool b,
const std::string& s )
78 std::cerr << file <<
":" << line <<
"\n\t"
79 << func <<
" : assertion failed\n\t" << s << std::endl;
81 #ifndef CLAW_SOFT_ASSERT
90 #define CLAW_ASSERT( b, s ) \
91 claw::debug_assert( __FILE__, __FUNCTION__, __LINE__, (b), (s) )
94 #define CLAW_FAIL( s ) \
95 claw::debug_assert( __FILE__, __FUNCTION__, __LINE__, false, (s) )
98 #define CLAW_PRECOND( b ) CLAW_ASSERT( b, "precondition failed: " #b )
101 #define CLAW_POSTCOND( b ) CLAW_ASSERT( b, "postcondition failed: " #b )
105 #define CLAW_ASSERT( b, s )
106 #define CLAW_FAIL( s )
107 #define CLAW_PRECOND( b )
108 #define CLAW_POSTCOND( b )
112 #endif // __CLAW_ASSERT_HPP__