|
|
|||
File indexing completed on 2025-12-16 10:08:59
0001 /*============================================================================= 0002 Copyright (c) 2001-2003 Joel de Guzman 0003 Copyright (c) 2002-2003 Hartmut Kaiser 0004 http://spirit.sourceforge.net/ 0005 0006 Distributed under the Boost Software License, Version 1.0. (See accompanying 0007 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 0008 =============================================================================*/ 0009 #if !defined(BOOST_SPIRIT_ASSERT_HPP) 0010 #define BOOST_SPIRIT_ASSERT_HPP 0011 0012 /////////////////////////////////////////////////////////////////////////////// 0013 // 0014 // BOOST_SPIRIT_ASSERT is used throughout the framework. It can be 0015 // overridden by the user. If BOOST_SPIRIT_ASSERT_EXCEPTION is defined, 0016 // then that will be thrown, otherwise, BOOST_SPIRIT_ASSERT simply turns 0017 // into a plain BOOST_ASSERT() 0018 // 0019 /////////////////////////////////////////////////////////////////////////////// 0020 #if !defined(BOOST_SPIRIT_ASSERT) 0021 #if defined(NDEBUG) 0022 #define BOOST_SPIRIT_ASSERT(x) 0023 #elif defined (BOOST_SPIRIT_ASSERT_EXCEPTION) 0024 #include <boost/throw_exception.hpp> 0025 #define BOOST_SPIRIT_ASSERT_AUX(f, l, x) BOOST_SPIRIT_ASSERT_AUX2(f, l, x) 0026 #define BOOST_SPIRIT_ASSERT_AUX2(f, l, x) \ 0027 ( (x) ? (void)0 : boost::throw_exception( \ 0028 BOOST_SPIRIT_ASSERT_EXCEPTION(f "(" #l "): " #x)) ) 0029 #define BOOST_SPIRIT_ASSERT(x) BOOST_SPIRIT_ASSERT_AUX(__FILE__, __LINE__, x) 0030 #else 0031 #include <boost/assert.hpp> 0032 #define BOOST_SPIRIT_ASSERT(x) BOOST_ASSERT(x) 0033 #endif 0034 #endif // !defined(BOOST_SPIRIT_ASSERT) 0035 0036 #endif // BOOST_SPIRIT_ASSERT_HPP
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|