Changeset 212:1ae84dea7d09 in lemon-1.2 for lemon/assert.h
- Timestamp:
- 07/14/08 09:15:23 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/assert.h
r210 r212 67 67 #undef LEMON_DEBUG 68 68 69 #if (defined(LEMON_ASSERT_LOG) ? 1 : 0) + 70 (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + 69 #if (defined(LEMON_ASSERT_LOG) ? 1 : 0) + \ 70 (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ 71 71 (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) > 1 72 72 #error "LEMON assertion system is not set properly" 73 73 #endif 74 74 75 #if ((defined(LEMON_ASSERT_LOG) ? 1 : 0) + 76 (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + 77 (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) == 1 || 78 defined(LEMON_ENABLE_ASSERTS)) && 79 (defined(LEMON_DISABLE_ASSERTS) || 75 #if ((defined(LEMON_ASSERT_LOG) ? 1 : 0) + \ 76 (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ 77 (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) == 1 || \ 78 defined(LEMON_ENABLE_ASSERTS)) && \ 79 (defined(LEMON_DISABLE_ASSERTS) || \ 80 80 defined(NDEBUG)) 81 81 #error "LEMON assertion system is not set properly" … … 169 169 /// behaviour is changed appropiately to the new settings. 170 170 # define LEMON_ASSERT(exp, msg) \ 171 (static_cast<void> (!!(exp) ? 0 : ( 172 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, 173 LEMON_FUNCTION_NAME, 171 (static_cast<void> (!!(exp) ? 0 : ( \ 172 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ 173 LEMON_FUNCTION_NAME, \ 174 174 ::lemon::_assert_bits::cstringify(msg), #exp), 0))) 175 175 … … 185 185 /// 186 186 /// \see LEMON_ASSERT 187 # define LEMON_FIXME(msg) 187 # define LEMON_FIXME(msg) \ 188 188 (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, \ 189 ::lemon::_assert_bits::cstringify(msg), 189 ::lemon::_assert_bits::cstringify(msg), \ 190 190 static_cast<const char*>(0))) 191 191 … … 213 213 /// 214 214 /// \see LEMON_ASSERT 215 # define LEMON_DEBUG(exp, msg) 216 (static_cast<void> (!!(exp) ? 0 : ( 215 # define LEMON_DEBUG(exp, msg) \ 216 (static_cast<void> (!!(exp) ? 0 : ( \ 217 217 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ 218 LEMON_FUNCTION_NAME, 218 LEMON_FUNCTION_NAME, \ 219 219 ::lemon::_assert_bits::cstringify(msg), #exp), 0))) 220 220 … … 226 226 # define LEMON_DEBUG(exp, msg) (static_cast<void>(0)) 227 227 # else 228 # define LEMON_ASSERT(exp, msg) 229 (static_cast<void> (!!(exp) ? 0 : ( 228 # define LEMON_ASSERT(exp, msg) \ 229 (static_cast<void> (!!(exp) ? 0 : ( \ 230 230 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ 231 LEMON_FUNCTION_NAME, 232 ::lemon::_assert_bits::cstringify(msg), 231 LEMON_FUNCTION_NAME, \ 232 ::lemon::_assert_bits::cstringify(msg), \ 233 233 #exp), 0))) 234 # define LEMON_FIXME(msg) 235 (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, 236 ::lemon::_assert_bits::cstringify(msg), 234 # define LEMON_FIXME(msg) \ 235 (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, \ 236 ::lemon::_assert_bits::cstringify(msg), \ 237 237 static_cast<const char*>(0))) 238 238 239 239 # if LEMON_ENABLE_DEBUG 240 240 # define LEMON_DEBUG(exp, msg) 241 (static_cast<void> (!!(exp) ? 0 : ( \242 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \243 LEMON_FUNCTION_NAME, \244 ::lemon::_assert_bits::cstringify(msg), 241 (static_cast<void> (!!(exp) ? 0 : ( \ 242 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ 243 LEMON_FUNCTION_NAME, \ 244 ::lemon::_assert_bits::cstringify(msg), \ 245 245 #exp), 0))) 246 246 # else … … 250 250 251 251 #endif 252 253 #ifdef DOXYGEN254 255 256 #else257 258 259 #endif260 261
Note: See TracChangeset
for help on using the changeset viewer.