Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #undef BOOST_ASSERT
00017
00018 #if defined(BOOST_DISABLE_ASSERTS)
00019
00020 # define BOOST_ASSERT(expr) ((void)0)
00021
00022 #elif defined(BOOST_ENABLE_ASSERT_HANDLER)
00023
00024 #include <boost/current_function.hpp>
00025
00026 namespace boost
00027 {
00028
00029 void assertion_failed(char const * expr, char const * function, char const * file, long line);
00030
00031 }
00032
00033 #define BOOST_ASSERT(expr) ((expr)? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
00034
00035 #else
00036 # include <assert.h>
00037 # define BOOST_ASSERT(expr) assert(expr)
00038 #endif
00039
00040 #undef BOOST_VERIFY
00041
00042 #if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) )
00043
00044 # define BOOST_VERIFY(expr) ((void)(expr))
00045
00046 #else
00047
00048 # define BOOST_VERIFY(expr) BOOST_ASSERT(expr)
00049
00050 #endif