1 #ifndef BOOST_ASSERT_HPP_INCLUDED
2 #define BOOST_ASSERT_HPP_INCLUDED
11 // Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
13 // Permission to copy, use, modify, sell and distribute this software
14 // is granted provided this copyright notice appears in all copies.
15 // This software is provided "as is" without express or implied
16 // warranty, and with no claim as to its suitability for any purpose.
20 // When BOOST_DEBUG is not defined, it defaults to 0 (off)
21 // for compatibility with programs that do not expect asserts
22 // in the smart pointer class templates.
24 // This default may be changed after an initial transition period.
37 #include <boost/current_function.hpp>
39 bool boost_error(char const * expr, char const * func, char const * file, long line);
41 # define BOOST_ASSERT(expr) ((expr) || !boost_error(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) || (assert(expr), true))
43 #endif // #ifndef BOOST_ASSERT
45 #else // #if BOOST_DEBUG
48 #define BOOST_ASSERT(expr) ((void)0)
50 #endif // #if BOOST_DEBUG
52 #endif // #ifndef BOOST_ASSERT_HPP_INCLUDED