File indexing completed on 2025-01-18 09:28:55
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_IMPL_DETACHED_HPP
0012 #define BOOST_ASIO_IMPL_DETACHED_HPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019 #include <boost/asio/async_result.hpp>
0020
0021 #include <boost/asio/detail/push_options.hpp>
0022
0023 namespace boost {
0024 namespace asio {
0025 namespace detail {
0026
0027
0028 class detached_handler
0029 {
0030 public:
0031 typedef void result_type;
0032
0033 detached_handler(detached_t)
0034 {
0035 }
0036
0037 template <typename... Args>
0038 void operator()(Args...)
0039 {
0040 }
0041 };
0042
0043 }
0044
0045 #if !defined(GENERATING_DOCUMENTATION)
0046
0047 template <typename Signature>
0048 struct async_result<detached_t, Signature>
0049 {
0050 typedef boost::asio::detail::detached_handler completion_handler_type;
0051
0052 typedef void return_type;
0053
0054 explicit async_result(completion_handler_type&)
0055 {
0056 }
0057
0058 void get()
0059 {
0060 }
0061
0062 template <typename Initiation, typename RawCompletionToken, typename... Args>
0063 static return_type initiate(Initiation&& initiation,
0064 RawCompletionToken&&, Args&&... args)
0065 {
0066 static_cast<Initiation&&>(initiation)(
0067 detail::detached_handler(detached_t()),
0068 static_cast<Args&&>(args)...);
0069 }
0070 };
0071
0072 #endif
0073
0074 }
0075 }
0076
0077 #include <boost/asio/detail/pop_options.hpp>
0078
0079 #endif