]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/asio/handler_type.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / asio / handler_type.hpp
1 //
2 // handler_type.hpp
3 // ~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot 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
11 #ifndef BOOST_ASIO_HANDLER_TYPE_HPP
12 #define BOOST_ASIO_HANDLER_TYPE_HPP
13
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18 #include <boost/asio/detail/config.hpp>
19 #include <boost/asio/detail/type_traits.hpp>
20
21 #include <boost/asio/detail/push_options.hpp>
22
23 namespace boost {
24 namespace asio {
25
26 /// (Deprecated: Use two-parameter version of async_result.) Default handler
27 /// type traits provided for all completion token types.
28 /**
29 * The handler_type traits class is used for determining the concrete handler
30 * type to be used for an asynchronous operation. It allows the handler type to
31 * be determined at the point where the specific completion handler signature
32 * is known.
33 *
34 * This template may be specialised for user-defined completion token types.
35 */
36 template <typename CompletionToken, typename Signature, typename = void>
37 struct handler_type
38 {
39 /// The handler type for the specific signature.
40 typedef typename conditional<
41 is_same<CompletionToken, typename decay<CompletionToken>::type>::value,
42 decay<CompletionToken>,
43 handler_type<typename decay<CompletionToken>::type, Signature>
44 >::type::type type;
45 };
46
47 } // namespace asio
48 } // namespace boost
49
50 #include <boost/asio/detail/pop_options.hpp>
51
52 #endif // BOOST_ASIO_HANDLER_TYPE_HPP