Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-01 08:20:15

0001 //  (C) Copyright Matt Borland 2021.
0002 //  Use, modification and distribution are subject to the
0003 //  Boost Software License, Version 1.0. (See accompanying file
0004 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #ifndef BOOST_MATH_TOOLS_THROW_EXCEPTION_HPP
0007 #define BOOST_MATH_TOOLS_THROW_EXCEPTION_HPP
0008 
0009 #include <boost/math/tools/is_standalone.hpp>
0010 
0011 #ifndef BOOST_MATH_STANDALONE
0012 
0013 #if defined(_MSC_VER) || defined(__GNUC__)
0014 # pragma push_macro( "I" )
0015 # undef I
0016 #endif
0017 
0018 #include <boost/throw_exception.hpp>
0019 #define BOOST_MATH_THROW_EXCEPTION(expr) boost::throw_exception(expr);
0020 
0021 #if defined(_MSC_VER) || defined(__GNUC__)
0022 # pragma pop_macro( "I" )
0023 #endif
0024 
0025 #else // Standalone mode - use standard library facilities
0026 
0027 #ifdef _MSC_VER
0028 #  ifdef _CPPUNWIND
0029 #    define BOOST_MATH_THROW_EXCEPTION(expr) throw expr;
0030 #  else
0031 #    define BOOST_MATH_THROW_EXCEPTION(expr)
0032 #  endif
0033 #else
0034 #  ifdef __EXCEPTIONS
0035 #    define BOOST_MATH_THROW_EXCEPTION(expr) throw expr;
0036 #  else
0037 #    define BOOST_MATH_THROW_EXCEPTION(expr)
0038 #  endif
0039 #endif
0040 
0041 #endif // BOOST_MATH_STANDALONE
0042 
0043 #endif // BOOST_MATH_TOOLS_THROW_EXCEPTION_HPP