summaryrefslogtreecommitdiff
path: root/boost/asio/impl
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
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')
-rw-r--r--boost/asio/impl/buffered_read_stream.hpp2
-rw-r--r--boost/asio/impl/buffered_write_stream.hpp2
-rw-r--r--boost/asio/impl/connect.hpp2
-rw-r--r--boost/asio/impl/defer.hpp2
-rw-r--r--boost/asio/impl/dispatch.hpp2
-rw-r--r--boost/asio/impl/error.ipp2
-rw-r--r--boost/asio/impl/execution_context.hpp2
-rw-r--r--boost/asio/impl/execution_context.ipp2
-rw-r--r--boost/asio/impl/executor.hpp2
-rw-r--r--boost/asio/impl/executor.ipp2
-rw-r--r--boost/asio/impl/handler_alloc_hook.ipp2
-rw-r--r--boost/asio/impl/io_context.hpp32
-rw-r--r--boost/asio/impl/io_context.ipp2
-rw-r--r--boost/asio/impl/post.hpp2
-rw-r--r--boost/asio/impl/read.hpp14
-rw-r--r--boost/asio/impl/read_at.hpp2
-rw-r--r--boost/asio/impl/read_until.hpp2
-rw-r--r--boost/asio/impl/serial_port_base.hpp2
-rw-r--r--boost/asio/impl/serial_port_base.ipp2
-rw-r--r--boost/asio/impl/spawn.hpp28
-rw-r--r--boost/asio/impl/src.cpp2
-rw-r--r--boost/asio/impl/src.hpp2
-rw-r--r--boost/asio/impl/system_context.hpp2
-rw-r--r--boost/asio/impl/system_context.ipp2
-rw-r--r--boost/asio/impl/system_executor.hpp2
-rw-r--r--boost/asio/impl/thread_pool.hpp2
-rw-r--r--boost/asio/impl/thread_pool.ipp2
-rw-r--r--boost/asio/impl/use_future.hpp2
-rw-r--r--boost/asio/impl/write.hpp14
-rw-r--r--boost/asio/impl/write_at.hpp2
30 files changed, 73 insertions, 67 deletions
diff --git a/boost/asio/impl/buffered_read_stream.hpp b/boost/asio/impl/buffered_read_stream.hpp
index 0813db4fce..2e1c55842b 100644
--- a/boost/asio/impl/buffered_read_stream.hpp
+++ b/boost/asio/impl/buffered_read_stream.hpp
@@ -2,7 +2,7 @@
// impl/buffered_read_stream.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)
diff --git a/boost/asio/impl/buffered_write_stream.hpp b/boost/asio/impl/buffered_write_stream.hpp
index baaa694538..c5ebf7537b 100644
--- a/boost/asio/impl/buffered_write_stream.hpp
+++ b/boost/asio/impl/buffered_write_stream.hpp
@@ -2,7 +2,7 @@
// impl/buffered_write_stream.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)
diff --git a/boost/asio/impl/connect.hpp b/boost/asio/impl/connect.hpp
index 50f1809797..497f25884c 100644
--- a/boost/asio/impl/connect.hpp
+++ b/boost/asio/impl/connect.hpp
@@ -2,7 +2,7 @@
// impl/connect.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)
diff --git a/boost/asio/impl/defer.hpp b/boost/asio/impl/defer.hpp
index afc29f965b..7cc86da45c 100644
--- a/boost/asio/impl/defer.hpp
+++ b/boost/asio/impl/defer.hpp
@@ -2,7 +2,7 @@
// impl/defer.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)
diff --git a/boost/asio/impl/dispatch.hpp b/boost/asio/impl/dispatch.hpp
index 5589b375e3..8bdce85180 100644
--- a/boost/asio/impl/dispatch.hpp
+++ b/boost/asio/impl/dispatch.hpp
@@ -2,7 +2,7 @@
// impl/dispatch.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)
diff --git a/boost/asio/impl/error.ipp b/boost/asio/impl/error.ipp
index 8626aded6a..49a10462bd 100644
--- a/boost/asio/impl/error.ipp
+++ b/boost/asio/impl/error.ipp
@@ -2,7 +2,7 @@
// impl/error.ipp
// ~~~~~~~~~~~~~~
//
-// 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)
diff --git a/boost/asio/impl/execution_context.hpp b/boost/asio/impl/execution_context.hpp
index 86acfc2d6e..eadf36b145 100644
--- a/boost/asio/impl/execution_context.hpp
+++ b/boost/asio/impl/execution_context.hpp
@@ -2,7 +2,7 @@
// impl/execution_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)
diff --git a/boost/asio/impl/execution_context.ipp b/boost/asio/impl/execution_context.ipp
index 01e92f6604..219a66113d 100644
--- a/boost/asio/impl/execution_context.ipp
+++ b/boost/asio/impl/execution_context.ipp
@@ -2,7 +2,7 @@
// impl/execution_context.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// 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)
diff --git a/boost/asio/impl/executor.hpp b/boost/asio/impl/executor.hpp
index e97a7d57c9..106763b042 100644
--- a/boost/asio/impl/executor.hpp
+++ b/boost/asio/impl/executor.hpp
@@ -2,7 +2,7 @@
// impl/executor.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)
diff --git a/boost/asio/impl/executor.ipp b/boost/asio/impl/executor.ipp
index dbedbc6cf0..86114d93f1 100644
--- a/boost/asio/impl/executor.ipp
+++ b/boost/asio/impl/executor.ipp
@@ -2,7 +2,7 @@
// impl/executor.ipp
// ~~~~~~~~~~~~~~~~~
//
-// 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)
diff --git a/boost/asio/impl/handler_alloc_hook.ipp b/boost/asio/impl/handler_alloc_hook.ipp
index d3e82e8bc2..2b04ec104e 100644
--- a/boost/asio/impl/handler_alloc_hook.ipp
+++ b/boost/asio/impl/handler_alloc_hook.ipp
@@ -2,7 +2,7 @@
// impl/handler_alloc_hook.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// 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)
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);
diff --git a/boost/asio/impl/io_context.ipp b/boost/asio/impl/io_context.ipp
index 0dd24713c5..96a7de7415 100644
--- a/boost/asio/impl/io_context.ipp
+++ b/boost/asio/impl/io_context.ipp
@@ -2,7 +2,7 @@
// impl/io_context.ipp
// ~~~~~~~~~~~~~~~~~~~
//
-// 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)
diff --git a/boost/asio/impl/post.hpp b/boost/asio/impl/post.hpp
index 520633d42b..d318f890ff 100644
--- a/boost/asio/impl/post.hpp
+++ b/boost/asio/impl/post.hpp
@@ -2,7 +2,7 @@
// impl/post.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)
diff --git a/boost/asio/impl/read.hpp b/boost/asio/impl/read.hpp
index 886565f2e8..9fbddc964e 100644
--- a/boost/asio/impl/read.hpp
+++ b/boost/asio/impl/read.hpp
@@ -2,7 +2,7 @@
// impl/read.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)
@@ -114,7 +114,7 @@ std::size_t read(SyncReadStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition, boost::system::error_code& ec,
typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
>::type*)
{
typename decay<DynamicBuffer>::type b(
@@ -145,7 +145,7 @@ template <typename SyncReadStream, typename DynamicBuffer>
inline std::size_t read(SyncReadStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
>::type*)
{
boost::system::error_code ec;
@@ -160,7 +160,7 @@ inline std::size_t read(SyncReadStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
boost::system::error_code& ec,
typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
>::type*)
{
return read(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
@@ -173,7 +173,7 @@ inline std::size_t read(SyncReadStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition,
typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
>::type*)
{
boost::system::error_code ec;
@@ -643,7 +643,7 @@ async_read(AsyncReadStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
>::type*)
{
return async_read(s,
@@ -660,7 +660,7 @@ async_read(AsyncReadStream& s,
CompletionCondition completion_condition,
BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
>::type*)
{
// If you get an error on the following line it means that your handler does
diff --git a/boost/asio/impl/read_at.hpp b/boost/asio/impl/read_at.hpp
index 457bc056f4..e3c31c543e 100644
--- a/boost/asio/impl/read_at.hpp
+++ b/boost/asio/impl/read_at.hpp
@@ -2,7 +2,7 @@
// impl/read_at.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)
diff --git a/boost/asio/impl/read_until.hpp b/boost/asio/impl/read_until.hpp
index c8a409f46b..704a97946b 100644
--- a/boost/asio/impl/read_until.hpp
+++ b/boost/asio/impl/read_until.hpp
@@ -2,7 +2,7 @@
// impl/read_until.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)
diff --git a/boost/asio/impl/serial_port_base.hpp b/boost/asio/impl/serial_port_base.hpp
index a138011347..7f2dfe88df 100644
--- a/boost/asio/impl/serial_port_base.hpp
+++ b/boost/asio/impl/serial_port_base.hpp
@@ -2,7 +2,7 @@
// impl/serial_port_base.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)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/impl/serial_port_base.ipp b/boost/asio/impl/serial_port_base.ipp
index 25a8a60ba0..9954f77d2e 100644
--- a/boost/asio/impl/serial_port_base.ipp
+++ b/boost/asio/impl/serial_port_base.ipp
@@ -2,7 +2,7 @@
// impl/serial_port_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/impl/spawn.hpp b/boost/asio/impl/spawn.hpp
index ec1ff45d19..c2da5ce09a 100644
--- a/boost/asio/impl/spawn.hpp
+++ b/boost/asio/impl/spawn.hpp
@@ -2,7 +2,7 @@
// impl/spawn.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)
@@ -245,7 +245,7 @@ public:
explicit async_result(
typename detail::coro_async_result<Handler,
typename decay<Arg1>::type>::completion_handler_type& h)
- : detail::coro_async_result<Handler, Arg1>(h)
+ : detail::coro_async_result<Handler, typename decay<Arg1>::type>(h)
{
}
};
@@ -273,7 +273,7 @@ public:
explicit async_result(
typename detail::coro_async_result<Handler,
typename decay<Arg2>::type>::completion_handler_type& h)
- : detail::coro_async_result<Handler, Arg2>(h)
+ : detail::coro_async_result<Handler, typename decay<Arg2>::type>(h)
{
}
};
@@ -315,7 +315,7 @@ public:
explicit async_result(
typename detail::coro_async_result<Handler,
- void>::completion_handler_type& h)
+ T>::completion_handler_type& h)
: detail::coro_async_result<Handler, T>(h)
{
}
@@ -352,11 +352,12 @@ namespace detail {
template <typename Handler, typename Function>
struct spawn_data : private noncopyable
{
- spawn_data(BOOST_ASIO_MOVE_ARG(Handler) handler,
- bool call_handler, BOOST_ASIO_MOVE_ARG(Function) function)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ template <typename Hand, typename Func>
+ spawn_data(BOOST_ASIO_MOVE_ARG(Hand) handler,
+ bool call_handler, BOOST_ASIO_MOVE_ARG(Func) function)
+ : handler_(BOOST_ASIO_MOVE_CAST(Hand)(handler)),
call_handler_(call_handler),
- function_(BOOST_ASIO_MOVE_CAST(Function)(function))
+ function_(BOOST_ASIO_MOVE_CAST(Func)(function))
{
}
@@ -442,6 +443,7 @@ void spawn(BOOST_ASIO_MOVE_ARG(Handler) handler,
!is_convertible<Handler&, execution_context&>::value>::type*)
{
typedef typename decay<Handler>::type handler_type;
+ typedef typename decay<Function>::type function_type;
typename associated_executor<handler_type>::type ex(
(get_associated_executor)(handler));
@@ -449,9 +451,9 @@ void spawn(BOOST_ASIO_MOVE_ARG(Handler) handler,
typename associated_allocator<handler_type>::type a(
(get_associated_allocator)(handler));
- detail::spawn_helper<handler_type, Function> helper;
+ detail::spawn_helper<handler_type, function_type> helper;
helper.data_.reset(
- new detail::spawn_data<handler_type, Function>(
+ new detail::spawn_data<handler_type, function_type>(
BOOST_ASIO_MOVE_CAST(Handler)(handler), true,
BOOST_ASIO_MOVE_CAST(Function)(function)));
helper.attributes_ = attributes;
@@ -464,6 +466,8 @@ void spawn(basic_yield_context<Handler> ctx,
BOOST_ASIO_MOVE_ARG(Function) function,
const boost::coroutines::attributes& attributes)
{
+ typedef typename decay<Function>::type function_type;
+
Handler handler(ctx.handler_); // Explicit copy that might be moved from.
typename associated_executor<Handler>::type ex(
@@ -472,9 +476,9 @@ void spawn(basic_yield_context<Handler> ctx,
typename associated_allocator<Handler>::type a(
(get_associated_allocator)(handler));
- detail::spawn_helper<Handler, Function> helper;
+ detail::spawn_helper<Handler, function_type> helper;
helper.data_.reset(
- new detail::spawn_data<Handler, Function>(
+ new detail::spawn_data<Handler, function_type>(
BOOST_ASIO_MOVE_CAST(Handler)(handler), false,
BOOST_ASIO_MOVE_CAST(Function)(function)));
helper.attributes_ = attributes;
diff --git a/boost/asio/impl/src.cpp b/boost/asio/impl/src.cpp
index 1b76dd83c4..3823acfaf3 100644
--- a/boost/asio/impl/src.cpp
+++ b/boost/asio/impl/src.cpp
@@ -2,7 +2,7 @@
// impl/src.cpp
// ~~~~~~~~~~~~
//
-// 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)
diff --git a/boost/asio/impl/src.hpp b/boost/asio/impl/src.hpp
index ad75cb744d..b891a453fe 100644
--- a/boost/asio/impl/src.hpp
+++ b/boost/asio/impl/src.hpp
@@ -2,7 +2,7 @@
// impl/src.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)
diff --git a/boost/asio/impl/system_context.hpp b/boost/asio/impl/system_context.hpp
index 88d42e51f9..dab5d4d085 100644
--- a/boost/asio/impl/system_context.hpp
+++ b/boost/asio/impl/system_context.hpp
@@ -2,7 +2,7 @@
// impl/system_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)
diff --git a/boost/asio/impl/system_context.ipp b/boost/asio/impl/system_context.ipp
index 86bb44548f..e56632c816 100644
--- a/boost/asio/impl/system_context.ipp
+++ b/boost/asio/impl/system_context.ipp
@@ -2,7 +2,7 @@
// impl/system_context.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// 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)
diff --git a/boost/asio/impl/system_executor.hpp b/boost/asio/impl/system_executor.hpp
index c8a0cf4027..c59e780d3f 100644
--- a/boost/asio/impl/system_executor.hpp
+++ b/boost/asio/impl/system_executor.hpp
@@ -2,7 +2,7 @@
// impl/system_executor.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)
diff --git a/boost/asio/impl/thread_pool.hpp b/boost/asio/impl/thread_pool.hpp
index 53a4900d34..ed8d768cd0 100644
--- a/boost/asio/impl/thread_pool.hpp
+++ b/boost/asio/impl/thread_pool.hpp
@@ -2,7 +2,7 @@
// impl/thread_pool.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)
diff --git a/boost/asio/impl/thread_pool.ipp b/boost/asio/impl/thread_pool.ipp
index 43ae029359..e0952eb657 100644
--- a/boost/asio/impl/thread_pool.ipp
+++ b/boost/asio/impl/thread_pool.ipp
@@ -2,7 +2,7 @@
// impl/thread_pool.ipp
// ~~~~~~~~~~~~~~~~~~~~
//
-// 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)
diff --git a/boost/asio/impl/use_future.hpp b/boost/asio/impl/use_future.hpp
index e02dfeebd2..a0e22acad3 100644
--- a/boost/asio/impl/use_future.hpp
+++ b/boost/asio/impl/use_future.hpp
@@ -2,7 +2,7 @@
// impl/use_future.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)
diff --git a/boost/asio/impl/write.hpp b/boost/asio/impl/write.hpp
index 8048380f9f..0be48b89f4 100644
--- a/boost/asio/impl/write.hpp
+++ b/boost/asio/impl/write.hpp
@@ -2,7 +2,7 @@
// impl/write.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)
@@ -112,7 +112,7 @@ std::size_t write(SyncWriteStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition, boost::system::error_code& ec,
typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
>::type*)
{
typename decay<DynamicBuffer>::type b(
@@ -127,7 +127,7 @@ template <typename SyncWriteStream, typename DynamicBuffer>
inline std::size_t write(SyncWriteStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
>::type*)
{
boost::system::error_code ec;
@@ -143,7 +143,7 @@ inline std::size_t write(SyncWriteStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
boost::system::error_code& ec,
typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
>::type*)
{
return write(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
@@ -156,7 +156,7 @@ inline std::size_t write(SyncWriteStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition,
typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
>::type*)
{
boost::system::error_code ec;
@@ -600,7 +600,7 @@ async_write(AsyncWriteStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
>::type*)
{
return async_write(s,
@@ -617,7 +617,7 @@ async_write(AsyncWriteStream& s,
CompletionCondition completion_condition,
BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
>::type*)
{
// If you get an error on the following line it means that your handler does
diff --git a/boost/asio/impl/write_at.hpp b/boost/asio/impl/write_at.hpp
index b1cf426c5e..6b597d2085 100644
--- a/boost/asio/impl/write_at.hpp
+++ b/boost/asio/impl/write_at.hpp
@@ -2,7 +2,7 @@
// impl/write_at.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)