throw_exception.hpp 730 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2017-2023 zhllxt
  3. *
  4. * author : zhllxt
  5. * email : 37792738@qq.com
  6. *
  7. * Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. */
  10. #ifndef __ASIO2_EXTERNAL_THROW_EXCEPTION_HPP__
  11. #define __ASIO2_EXTERNAL_THROW_EXCEPTION_HPP__
  12. #include <asio2/config.hpp>
  13. #if !defined(ASIO2_HEADER_ONLY) && __has_include(<boost/throw_exception.hpp>)
  14. #include <boost/throw_exception.hpp>
  15. #ifndef ASIO2_THROW_EXCEPTION
  16. #define ASIO2_THROW_EXCEPTION BOOST_THROW_EXCEPTION
  17. #endif
  18. #else
  19. #include <asio2/bho/throw_exception.hpp>
  20. #ifndef ASIO2_THROW_EXCEPTION
  21. #define ASIO2_THROW_EXCEPTION BHO_THROW_EXCEPTION
  22. #endif
  23. #endif
  24. #endif