Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:10:41

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
0004 // Copyright (c) 2007, 2014 Peter Dimov
0005 // Copyright (c) Beman Dawes 2011
0006 // Copyright (c) 2015 Oracle and/or its affiliates.
0007 
0008 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0009 
0010 // Use, modification and distribution is subject to the Boost Software License,
0011 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0012 // http://www.boost.org/LICENSE_1_0.txt)
0013 
0014 #ifndef BOOST_GEOMETRY_CORE_ASSERT_HPP
0015 #define BOOST_GEOMETRY_CORE_ASSERT_HPP
0016 
0017 #include <boost/assert.hpp>
0018 
0019 #undef BOOST_GEOMETRY_ASSERT
0020 #undef BOOST_GEOMETRY_ASSERT_MSG
0021 
0022 #if defined(BOOST_GEOMETRY_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_GEOMETRY_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) )
0023 
0024 #include <boost/config.hpp> // for BOOST_LIKELY
0025 #include <boost/current_function.hpp>
0026 
0027 namespace boost { namespace geometry
0028 {
0029     void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined
0030     void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line); // user defined
0031 }} // namespace boost::geometry
0032 
0033 #define BOOST_GEOMETRY_ASSERT(expr) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::geometry::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
0034 #define BOOST_GEOMETRY_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::geometry::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
0035 
0036 #else
0037 
0038 #define BOOST_GEOMETRY_ASSERT(expr) BOOST_ASSERT(expr)
0039 #define BOOST_GEOMETRY_ASSERT_MSG(expr, msg) BOOST_ASSERT_MSG(expr, msg)
0040 
0041 #endif
0042 
0043 #endif // BOOST_GEOMETRY_CORE_EXCEPTION_HPP