File indexing completed on 2024-11-15 09:10:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
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);
0030 void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line);
0031 }}
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