nothrow.hpp 679 B

123456789101112131415161718192021222324252627
  1. // (C) Copyright Antony Polukhin 2022.
  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_NOTHROW_HPP
  6. #define BOOST_MATH_TOOLS_NOTHROW_HPP
  7. #include <boost/math/tools/is_standalone.hpp>
  8. #ifndef BOOST_MATH_STANDALONE
  9. #include <boost/config.hpp>
  10. #define BOOST_MATH_NOTHROW BOOST_NOEXCEPT_OR_NOTHROW
  11. #else // Standalone mode - use noexcept or throw()
  12. #if __cplusplus >= 201103L
  13. #define BOOST_MATH_NOTHROW noexcept
  14. #else
  15. #define BOOST_MATH_NOTHROW throw()
  16. #endif
  17. #endif
  18. #endif // BOOST_MATH_TOOLS_NOTHROW_HPP