Don't copy completion handlers:

All asynchronous operations will now be able to use move-only
CompletionHandlers.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
Damian Jarek authored and Vinnie Falco committed 2017-12-04 12:14:40 -08:00
1 parent 3361df142c
commit 200e898f7e
15 files changed
+69 -75

No files matched your search

@@ -37,7 +37,7 @@ class buffered_read_stream<
public:
read_some_op(read_some_op&&) = default;
read_some_op(read_some_op const&) = default;
read_some_op(read_some_op const&) = delete;
template<class DeducedHandler, class... Args>
read_some_op(DeducedHandler&& h,
@@ -237,7 +237,7 @@ async_read_some(
void(error_code, std::size_t)> init{handler};
read_some_op<MutableBufferSequence, BOOST_ASIO_HANDLER_TYPE(
ReadHandler, void(error_code, std::size_t))>{
init.completion_handler, *this, buffers}(
std::move(init.completion_handler), *this, buffers}(
error_code{}, 0);
return init.result.get();
}