summaryrefslogtreecommitdiff
path: root/boost/asio/impl/io_context.hpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:12:59 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:12:59 +0900
commitb8cf34c691623e4ec329053cbbf68522a855882d (patch)
tree34da08632a99677f6b79ecb65e5b655a5b69a67f /boost/asio/impl/io_context.hpp
parent3fdc3e5ee96dca5b11d1694975a65200787eab86 (diff)
downloadboost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.gz
boost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.bz2
boost-b8cf34c691623e4ec329053cbbf68522a855882d.zip
Imported Upstream version 1.67.0upstream/1.67.0
Diffstat (limited to 'boost/asio/impl/io_context.hpp')
-rw-r--r--boost/asio/impl/io_context.hpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/boost/asio/impl/io_context.hpp b/boost/asio/impl/io_context.hpp
index 93e719ed80..21dd83688c 100644
--- a/boost/asio/impl/io_context.hpp
+++ b/boost/asio/impl/io_context.hpp
@@ -2,7 +2,7 @@
// impl/io_context.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2018 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)
@@ -130,15 +130,16 @@ inline void io_context::reset()
restart();
}
-template <typename CompletionHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ())
-io_context::dispatch(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler)
+template <typename LegacyCompletionHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
+io_context::dispatch(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
{
// If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a CompletionHandler.
- BOOST_ASIO_COMPLETION_HANDLER_CHECK(CompletionHandler, handler) type_check;
+ // not meet the documented type requirements for a LegacyCompletionHandler.
+ BOOST_ASIO_LEGACY_COMPLETION_HANDLER_CHECK(
+ LegacyCompletionHandler, handler) type_check;
- async_completion<CompletionHandler, void ()> init(handler);
+ async_completion<LegacyCompletionHandler, void ()> init(handler);
if (impl_.can_dispatch())
{
@@ -150,7 +151,7 @@ io_context::dispatch(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler)
{
// Allocate and construct an operation to wrap the handler.
typedef detail::completion_handler<
- typename handler_type<CompletionHandler, void ()>::type> op;
+ typename handler_type<LegacyCompletionHandler, void ()>::type> op;
typename op::ptr p = { detail::addressof(init.completion_handler),
op::ptr::allocate(init.completion_handler), 0 };
p.p = new (p.v) op(init.completion_handler);
@@ -165,22 +166,23 @@ io_context::dispatch(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler)
return init.result.get();
}
-template <typename CompletionHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ())
-io_context::post(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler)
+template <typename LegacyCompletionHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
+io_context::post(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
{
// If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a CompletionHandler.
- BOOST_ASIO_COMPLETION_HANDLER_CHECK(CompletionHandler, handler) type_check;
+ // not meet the documented type requirements for a LegacyCompletionHandler.
+ BOOST_ASIO_LEGACY_COMPLETION_HANDLER_CHECK(
+ LegacyCompletionHandler, handler) type_check;
- async_completion<CompletionHandler, void ()> init(handler);
+ async_completion<LegacyCompletionHandler, void ()> init(handler);
bool is_continuation =
boost_asio_handler_cont_helpers::is_continuation(init.completion_handler);
// Allocate and construct an operation to wrap the handler.
typedef detail::completion_handler<
- typename handler_type<CompletionHandler, void ()>::type> op;
+ typename handler_type<LegacyCompletionHandler, void ()>::type> op;
typename op::ptr p = { detail::addressof(init.completion_handler),
op::ptr::allocate(init.completion_handler), 0 };
p.p = new (p.v) op(init.completion_handler);