sp_noexcept.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef BOOST_SMART_PTR_DETAIL_SP_NOEXCEPT_HPP_INCLUDED
  2. #define BOOST_SMART_PTR_DETAIL_SP_NOEXCEPT_HPP_INCLUDED
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  5. # pragma once
  6. #endif
  7. // detail/sp_noexcept.hpp
  8. //
  9. // Copyright 2016, 2017 Peter Dimov
  10. //
  11. // Distributed under the Boost Software License, Version 1.0.
  12. // See accompanying file LICENSE_1_0.txt or copy at
  13. // http://www.boost.org/LICENSE_1_0.txt
  14. #include <boost/config.hpp>
  15. // BOOST_SP_NOEXCEPT
  16. #if defined( BOOST_MSVC ) && BOOST_MSVC >= 1700 && BOOST_MSVC < 1900
  17. # define BOOST_SP_NOEXCEPT BOOST_NOEXCEPT_OR_NOTHROW
  18. #else
  19. # define BOOST_SP_NOEXCEPT BOOST_NOEXCEPT
  20. #endif
  21. // BOOST_SP_NOEXCEPT_WITH_ASSERT
  22. #if defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) )
  23. # define BOOST_SP_NOEXCEPT_WITH_ASSERT BOOST_SP_NOEXCEPT
  24. #elif defined(BOOST_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) )
  25. # define BOOST_SP_NOEXCEPT_WITH_ASSERT
  26. #else
  27. # define BOOST_SP_NOEXCEPT_WITH_ASSERT BOOST_SP_NOEXCEPT
  28. #endif
  29. #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_NOEXCEPT_HPP_INCLUDED