// // async_result.hpp // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef ARCHETYPES_DEPRECATED_ASYNC_RESULT_HPP #define ARCHETYPES_DEPRECATED_ASYNC_RESULT_HPP #include #if !defined(BOOST_ASIO_NO_DEPRECATED) #include namespace archetypes { struct deprecated_lazy_handler { }; struct deprecated_concrete_handler { deprecated_concrete_handler(deprecated_lazy_handler) { } template void operator()(Arg1) { } template void operator()(Arg1, Arg2) { } #if defined(BOOST_ASIO_HAS_MOVE) deprecated_concrete_handler(deprecated_concrete_handler&&) {} private: deprecated_concrete_handler(const deprecated_concrete_handler&); #endif // defined(BOOST_ASIO_HAS_MOVE) }; } // namespace archetypes namespace boost { namespace asio { template struct handler_type { typedef archetypes::deprecated_concrete_handler type; }; template <> class async_result { public: // The return type of the initiating function. typedef double type; // Construct an async_result from a given handler. explicit async_result(archetypes::deprecated_concrete_handler&) { } // Obtain the value to be returned from the initiating function. type get() { return 42; } }; } // namespace asio } // namespace boost #endif // !defined(BOOST_ASIO_NO_DEPRECATED) #endif // ARCHETYPES_DEPRECATED_ASYNC_RESULT_HPP