throw_exception.hpp 723 B

12345678910111213141516171819202122
  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)
  5. #ifndef BOOST_MATH_TOOLS_THROW_EXCEPTION_HPP
  6. #define BOOST_MATH_TOOLS_THROW_EXCEPTION_HPP
  7. #include <boost/math/tools/is_standalone.hpp>
  8. #ifndef BOOST_MATH_STANDALONE
  9. #include <boost/throw_exception.hpp>
  10. #define BOOST_MATH_THROW_EXCEPTION(expr) boost::throw_exception(expr);
  11. #else // Standalone mode - use standard library facilities
  12. #define BOOST_MATH_THROW_EXCEPTION(expr) throw expr;
  13. #endif // BOOST_MATH_STANDALONE
  14. #endif // BOOST_MATH_TOOLS_THROW_EXCEPTION_HPP