forked from boostorg/utility
Tweak comments. Include <assert.h> and <boost/current_function.hpp> only
when needed. [SVN r12446]
This commit is contained in:
@ -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 <boost/current_function.hpp>
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef BOOST_ASSERT
|
||||
|
||||
#include <boost/current_function.hpp>
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user