From c7c09696db239ae7cf8a0e924200a4292f659f6f Mon Sep 17 00:00:00 2001 From: Darin Adler Date: Tue, 22 Jan 2002 18:28:33 +0000 Subject: [PATCH] Tweak comments. Include and only when needed. [SVN r12446] --- include/boost/assert.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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