5 // Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
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)
11 #ifndef ARCHETYPES_DEPRECATED_ASYNC_RESULT_HPP
12 #define ARCHETYPES_DEPRECATED_ASYNC_RESULT_HPP
14 #include <boost/asio/async_result.hpp>
16 #if !defined(BOOST_ASIO_NO_DEPRECATED)
18 #include <boost/asio/handler_type.hpp>
20 namespace archetypes {
22 struct deprecated_lazy_handler
26 struct deprecated_concrete_handler
28 deprecated_concrete_handler(deprecated_lazy_handler)
32 template <typename Arg1>
37 template <typename Arg1, typename Arg2>
38 void operator()(Arg1, Arg2)
42 #if defined(BOOST_ASIO_HAS_MOVE)
43 deprecated_concrete_handler(deprecated_concrete_handler&&) {}
45 deprecated_concrete_handler(const deprecated_concrete_handler&);
46 #endif // defined(BOOST_ASIO_HAS_MOVE)
49 } // namespace archetypes
54 template <typename Signature>
55 struct handler_type<archetypes::deprecated_lazy_handler, Signature>
57 typedef archetypes::deprecated_concrete_handler type;
61 class async_result<archetypes::deprecated_concrete_handler>
64 // The return type of the initiating function.
67 // Construct an async_result from a given handler.
68 explicit async_result(archetypes::deprecated_concrete_handler&)
72 // Obtain the value to be returned from the initiating function.
82 #endif // !defined(BOOST_ASIO_NO_DEPRECATED)
84 #endif // ARCHETYPES_DEPRECATED_ASYNC_RESULT_HPP