diff --git a/include/boost/assert.hpp b/include/boost/assert.hpp index 3a501dc..645404d 100644 --- a/include/boost/assert.hpp +++ b/include/boost/assert.hpp @@ -18,26 +18,26 @@ // // When BOOST_DEBUG is not defined, it defaults to 0 (off) -// for backward compatibility with programs that do not -// define a boost_error handler +// for compatibility with programs that do not expect asserts +// in the smart pointer class templates. // -// After a reasonable transition period, the default can be -// changed to something more appropriate. +// This default may be changed after an initial transition period. // #ifndef BOOST_DEBUG #define BOOST_DEBUG 0 #endif -bool boost_error(char const * expr, char const * func, char const * file, long line); - #if BOOST_DEBUG -#include #include #ifndef BOOST_ASSERT +#include + +bool boost_error(char const * expr, char const * func, char const * file, long line); + # define BOOST_ASSERT(expr) ((expr) || !boost_error(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) || (assert(expr), true)) #endif // #ifndef BOOST_ASSERT @@ -47,6 +47,6 @@ bool boost_error(char const * expr, char const * func, char const * file, long l #undef BOOST_ASSERT #define BOOST_ASSERT(expr) ((void)0) -#endif // #ifdef BOOST_DEBUG +#endif // #if BOOST_DEBUG #endif // #ifndef BOOST_ASSERT_HPP_INCLUDED