1 // (C) Copyright Matt Borland 2021.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef BOOST_MATH_TOOLS_THROW_EXCEPTION_HPP
7 #define BOOST_MATH_TOOLS_THROW_EXCEPTION_HPP
9 #include <boost/math/tools/is_standalone.hpp>
11 #ifndef BOOST_MATH_STANDALONE
13 #include <boost/throw_exception.hpp>
14 #define BOOST_MATH_THROW_EXCEPTION(expr) boost::throw_exception(expr);
16 #else // Standalone mode - use standard library facilities
18 #define BOOST_MATH_THROW_EXCEPTION(expr) throw expr;
20 #endif // BOOST_MATH_STANDALONE
22 #endif // BOOST_MATH_TOOLS_THROW_EXCEPTION_HPP