123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- #ifndef BOOST_ASIO_DISPATCH_HPP
- #define BOOST_ASIO_DISPATCH_HPP
- #if defined(_MSC_VER) && (_MSC_VER >= 1200)
- # pragma once
- #endif
- #include <boost/asio/detail/config.hpp>
- #include <boost/asio/async_result.hpp>
- #include <boost/asio/detail/type_traits.hpp>
- #include <boost/asio/execution_context.hpp>
- #include <boost/asio/execution/executor.hpp>
- #include <boost/asio/is_executor.hpp>
- #include <boost/asio/detail/push_options.hpp>
- namespace boost {
- namespace asio {
- template <BOOST_ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
- BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch(
- BOOST_ASIO_MOVE_ARG(CompletionToken) token);
- template <typename Executor,
- BOOST_ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken
- BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
- BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch(
- const Executor& ex,
- BOOST_ASIO_MOVE_ARG(CompletionToken) token
- BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
- typename constraint<
- execution::is_executor<Executor>::value || is_executor<Executor>::value
- >::type = 0);
- template <typename ExecutionContext,
- BOOST_ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken
- BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename ExecutionContext::executor_type)>
- BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch(
- ExecutionContext& ctx,
- BOOST_ASIO_MOVE_ARG(CompletionToken) token
- BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(
- typename ExecutionContext::executor_type),
- typename constraint<is_convertible<
- ExecutionContext&, execution_context&>::value>::type = 0);
- }
- }
- #include <boost/asio/detail/pop_options.hpp>
- #include <boost/asio/impl/dispatch.hpp>
- #endif
|