2 // boost/assert.hpp - BOOST_ASSERT(expr)
\r
4 // Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
\r
5 // Copyright (c) 2007 Peter Dimov
\r
7 // Distributed under the Boost Software License, Version 1.0. (See
\r
8 // accompanying file LICENSE_1_0.txt or copy at
\r
9 // http://www.boost.org/LICENSE_1_0.txt)
\r
11 // Note: There are no include guards. This is intentional.
\r
13 // See http://www.boost.org/libs/utility/assert.html for documentation.
\r
18 #if defined(BOOST_DISABLE_ASSERTS)
\r
20 # define BOOST_ASSERT(expr) ((void)0)
\r
22 #elif defined(BOOST_ENABLE_ASSERT_HANDLER)
\r
24 #include <boost/current_function.hpp>
\r
29 void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined
\r
31 } // namespace boost
\r
33 #define BOOST_ASSERT(expr) ((expr)? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
\r
36 # include <assert.h> // .h to support old libraries w/o <cassert> - effect is the same
\r
37 # define BOOST_ASSERT(expr) assert(expr)
\r
42 #if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) )
\r
44 # define BOOST_VERIFY(expr) ((void)(expr))
\r
48 # define BOOST_VERIFY(expr) BOOST_ASSERT(expr)
\r