Imported Upstream version 1.64.0
[platform/upstream/boost.git] / boost / process / detail / windows / async_handler.hpp
1 // Copyright (c) 2016 Klemens D. Morgenstern\r
2 //\r
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying\r
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
5
6
7 #ifndef BOOST_PROCESS_WINDOWS_ASYNC_HANDLER_HPP_\r
8 #define BOOST_PROCESS_WINDOWS_ASYNC_HANDLER_HPP_\r
9
10 #include <boost/process/detail/windows/handler.hpp>\r
11 #include <type_traits>\r
12
13 namespace boost { namespace process { namespace detail { namespace windows {\r
14
15 struct require_io_service {};\r
16
17 struct async_handler : handler_base_ext, require_io_service\r
18 {\r
19 };\r
20
21 template<typename T>\r
22 struct is_async_handler :  std::is_base_of<async_handler, T> {};\r
23 template<typename T>\r
24 struct is_async_handler<T&> :  std::is_base_of<async_handler, T> {};\r
25 template<typename T>\r
26 struct is_async_handler<const T&> :  std::is_base_of<async_handler, T> {};\r
27
28 template<typename T>\r
29 struct does_require_io_service : std::is_base_of<require_io_service, T> {};\r
30
31 template<typename T>\r
32 struct does_require_io_service<T&> : std::is_base_of<require_io_service, T> {};\r
33
34 template<typename T>\r
35 struct does_require_io_service<const T&> : std::is_base_of<require_io_service, T> {};\r
36
37
38 }}}}\r
39
40 #endif /* BOOST_PROCESS_WINDOWS_ASYNC_HANDLER_HPP_ */\r