00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #undef BOOST_ASSERT
00016
00017 #if defined(BOOST_DISABLE_ASSERTS)
00018
00019 # define BOOST_ASSERT(expr) ((void)0)
00020
00021 #elif defined(BOOST_ENABLE_ASSERT_HANDLER)
00022
00023 #include <boost/current_function.hpp>
00024
00025 namespace boost
00026 {
00027
00028 void assertion_failed(char const * expr, char const * function, char const * file, long line);
00029
00030 }
00031
00032 #define BOOST_ASSERT(expr) ((expr)? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
00033
00034 #else
00035 # include <assert.h>
00036 # define BOOST_ASSERT(expr) assert(expr)
00037 #endif