exception.hpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. #ifndef BOOST_COBALT_DETAIL_EXCEPTION_HPP
  8. #define BOOST_COBALT_DETAIL_EXCEPTION_HPP
  9. #include <boost/config.hpp>
  10. #include <boost/cobalt/config.hpp>
  11. #include <exception>
  12. namespace boost::cobalt::detail
  13. {
  14. BOOST_COBALT_DECL std::exception_ptr moved_from_exception();
  15. BOOST_COBALT_DECL std::exception_ptr detached_exception();
  16. BOOST_COBALT_DECL std::exception_ptr completed_unexpected();
  17. BOOST_COBALT_DECL std::exception_ptr wait_not_ready();
  18. BOOST_COBALT_DECL std::exception_ptr already_awaited();
  19. BOOST_COBALT_DECL std::exception_ptr allocation_failed();
  20. BOOST_COBALT_DECL BOOST_NORETURN void throw_bad_executor(const boost::source_location & loc = BOOST_CURRENT_LOCATION);
  21. template<typename >
  22. std::exception_ptr wait_not_ready() { return boost::cobalt::detail::wait_not_ready();}
  23. }
  24. #endif //BOOST_COBALT_DETAIL_EXCEPTION_HPP