assert.hpp 631 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_ASSERT_HPP__
  11. #define __ASIO2_EXTERNAL_ASSERT_HPP__
  12. #include <asio2/config.hpp>
  13. #if !defined(ASIO2_HEADER_ONLY) && __has_include(<boost/assert.hpp>)
  14. #include <boost/assert.hpp>
  15. #ifndef ASIO2_ASSERT
  16. #define ASIO2_ASSERT BOOST_ASSERT
  17. #endif
  18. #else
  19. #include <asio2/bho/assert.hpp>
  20. #ifndef ASIO2_ASSERT
  21. #define ASIO2_ASSERT BHO_ASSERT
  22. #endif
  23. #endif
  24. #endif