]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/assert.hpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
281c4656559fd9ef3018aad6362a2cc0e3f2b558
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / assert.hpp
1 //\r
2 //  boost/assert.hpp - BOOST_ASSERT(expr)\r
3 //\r
4 //  Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.\r
5 //  Copyright (c) 2007 Peter Dimov\r
6 //\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
10 //\r
11 //  Note: There are no include guards. This is intentional.\r
12 //\r
13 //  See http://www.boost.org/libs/utility/assert.html for documentation.\r
14 //\r
15 \r
16 #undef BOOST_ASSERT\r
17 \r
18 #if defined(BOOST_DISABLE_ASSERTS)\r
19 \r
20 # define BOOST_ASSERT(expr) ((void)0)\r
21 \r
22 #elif defined(BOOST_ENABLE_ASSERT_HANDLER)\r
23 \r
24 #include <boost/current_function.hpp>\r
25 \r
26 namespace boost\r
27 {\r
28 \r
29 void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined\r
30 \r
31 } // namespace boost\r
32 \r
33 #define BOOST_ASSERT(expr) ((expr)? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))\r
34 \r
35 #else\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
38 #endif\r
39 \r
40 #undef BOOST_VERIFY\r
41 \r
42 #if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) )\r
43 \r
44 # define BOOST_VERIFY(expr) ((void)(expr))\r
45 \r
46 #else\r
47 \r
48 # define BOOST_VERIFY(expr) BOOST_ASSERT(expr)\r
49 \r
50 #endif\r