throw_exception.hpp 535 B

123456789101112131415161718192021
  1. // Copyright 2019 Hans Dembinski
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt
  5. // or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. #ifdef BOOST_NO_EXCEPTIONS
  7. #include <cstdlib> // std::abort
  8. #include <exception>
  9. #include <iostream>
  10. namespace boost {
  11. // dummy implementation for user-defined function from boost/throw_exception.hpp
  12. inline void throw_exception(std::exception const& e) {
  13. std::cerr << e.what() << std::endl;
  14. std::abort();
  15. }
  16. } // namespace boost
  17. #endif