/* * async_handler.hpp * * Created on: 12.06.2016 * Author: Klemens */ #ifndef BOOST_PROCESS_DETAIL_ASYNC_HANDLER_HPP_ #define BOOST_PROCESS_DETAIL_ASYNC_HANDLER_HPP_ #include #if defined(BOOST_POSIX_API) #include #include #include #else #include #include #endif namespace boost { namespace process { namespace detail { #if defined(BOOST_POSIX_API) using ::boost::process::detail::posix::is_async_handler; using ::boost::process::detail::posix::does_require_io_service; #else using ::boost::process::detail::windows::is_async_handler; using ::boost::process::detail::windows::does_require_io_service; #endif template struct has_io_service; template struct has_io_service { typedef typename has_io_service::type next; typedef typename std::is_same< typename std::remove_reference::type, boost::asio::io_service>::type is_ios; typedef typename std::conditional::type type; }; template struct has_io_service { typedef typename std::is_same< typename std::remove_reference::type, boost::asio::io_service>::type type; }; template using has_io_service_t = typename has_io_service::type; template struct has_async_handler; template struct has_async_handler { typedef typename has_async_handler::type next; typedef typename is_async_handler::type is_ios; typedef typename std::conditional::type type; }; template struct has_async_handler { typedef typename is_async_handler::type type; }; template struct needs_io_service; template struct needs_io_service { typedef typename needs_io_service::type next; typedef typename does_require_io_service::type is_ios; typedef typename std::conditional::type type; }; template struct needs_io_service { typedef typename does_require_io_service::type type; }; template boost::asio::io_service &get_io_service_var(boost::asio::io_service & f, Args&...) { return f; } template boost::asio::io_service &get_io_service_var(First&, Args&...args) { return get_io_service_var(args...); } } } } #endif /* BOOST_PROCESS_DETAIL_ASYNC_HANDLER_HPP_ */