31 #if defined(BOOST_DISABLE_ASSERTS) 33 # define BOOST_ASSERT(expr) ((void)0) 35 #elif defined(BOOST_ENABLE_ASSERT_HANDLER) 41 void assertion_failed(
char const * expr,
42 char const *
function,
char const * file,
long line);
45 #define BOOST_ASSERT(expr) ((expr) \ 47 : ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) 51 # define BOOST_ASSERT(expr) assert(expr) 58 # undef BOOST_ASSERT_MSG 60 #if defined(BOOST_DISABLE_ASSERTS) || defined(NDEBUG) 62 #define BOOST_ASSERT_MSG(expr, msg) ((void)0) 64 #elif defined(BOOST_ENABLE_ASSERT_HANDLER) 71 char const *
function,
char const * file,
long line);
74 #define BOOST_ASSERT_MSG(expr, msg) ((expr) \ 76 : ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) 79 #ifndef BOOST_ASSERT_HPP 80 #define BOOST_ASSERT_HPP 87 #ifndef BOOST_ASSERT_MSG_OSTREAM 88 # define BOOST_ASSERT_MSG_OSTREAM std::cerr 98 char const * file,
long line)
101 <<
"***** Internal Program Error - assertion (" << expr <<
") failed in " 103 << file <<
'(' << line <<
"): " << msg << std::endl;
111 #define BOOST_ASSERT_MSG(expr, msg) ((expr) \ 113 : ::boost::assertion::detail::assertion_failed_msg(#expr, msg, \ 114 BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) 123 #if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) ) 125 # define BOOST_VERIFY(expr) ((void)(expr)) 129 # define BOOST_VERIFY(expr) BOOST_ASSERT(expr)
void assertion_failed_msg(char const *expr, char const *msg, char const *function, char const *file, long line)
#define BOOST_ASSERT_MSG_OSTREAM