throw_exception.hpp 806 B

123456789101112131415161718192021222324252627282930
  1. // Copyright (C) 2023 Braden Ganetsky
  2. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #ifndef BOOST_UNORDERED_DETAIL_THROW_EXCEPTION_HPP
  5. #define BOOST_UNORDERED_DETAIL_THROW_EXCEPTION_HPP
  6. #include <boost/config.hpp>
  7. #if defined(BOOST_HAS_PRAGMA_ONCE)
  8. #pragma once
  9. #endif
  10. #include <boost/throw_exception.hpp>
  11. #include <stdexcept>
  12. namespace boost {
  13. namespace unordered {
  14. namespace detail {
  15. BOOST_NOINLINE BOOST_NORETURN inline void throw_out_of_range(
  16. char const* message)
  17. {
  18. boost::throw_exception(std::out_of_range(message));
  19. }
  20. } // namespace detail
  21. } // namespace unordered
  22. } // namespace boost
  23. #endif // BOOST_UNORDERED_DETAIL_THROW_EXCEPTION_HPP