async_handler.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (c) 2016 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_WINDOWS_ASYNC_HANDLER_HPP_
  6. #define BOOST_PROCESS_WINDOWS_ASYNC_HANDLER_HPP_
  7. #include <boost/process/v1/detail/config.hpp>
  8. #include <boost/process/v1/detail/windows/handler.hpp>
  9. #include <type_traits>
  10. namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace windows {
  11. struct require_io_context {};
  12. struct async_handler : handler_base_ext, require_io_context
  13. {
  14. };
  15. template<typename T>
  16. struct is_async_handler : std::is_base_of<async_handler, T> {};
  17. template<typename T>
  18. struct is_async_handler<T&> : std::is_base_of<async_handler, T> {};
  19. template<typename T>
  20. struct is_async_handler<const T&> : std::is_base_of<async_handler, T> {};
  21. template<typename T>
  22. struct does_require_io_context : std::is_base_of<require_io_context, T> {};
  23. template<typename T>
  24. struct does_require_io_context<T&> : std::is_base_of<require_io_context, T> {};
  25. template<typename T>
  26. struct does_require_io_context<const T&> : std::is_base_of<require_io_context, T> {};
  27. }}}}}
  28. #endif /* BOOST_PROCESS_WINDOWS_ASYNC_HANDLER_HPP_ */