throw_exception.hpp 768 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (c) 2022 Klemens D. Morgenstern
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_PROCESS_V2_DETAIL_THROW_EXCEPTION_HPP
  6. #define BOOST_PROCESS_V2_DETAIL_THROW_EXCEPTION_HPP
  7. #include <boost/process/v2/detail/config.hpp>
  8. #if !defined(BOOST_PROCESS_V2_STANDALONE)
  9. #include <boost/throw_exception.hpp>
  10. #endif
  11. BOOST_PROCESS_V2_BEGIN_NAMESPACE
  12. namespace detail
  13. {
  14. #if defined(BOOST_PROCESS_V2_STANDALONE)
  15. template <typename Exception>
  16. inline void throw_exception(const Exception& e)
  17. {
  18. throw e;
  19. }
  20. #else
  21. using boost::throw_exception;
  22. #endif
  23. }
  24. BOOST_PROCESS_V2_END_NAMESPACE
  25. #endif //BOOST_PROCESS_V2_DETAIL_THROW_EXCEPTION_HPP