forked from boostorg/beast
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:
1 parent
3361df142c
commit
200e898f7e
15 files changed
+69
-75
No files matched your search
@@ -54,7 +54,7 @@ class stream<NextLayer>::write_some_op
|
||||
|
||||
public:
|
||||
write_some_op(write_some_op&&) = default;
|
||||
write_some_op(write_some_op const&) = default;
|
||||
write_some_op(write_some_op const&) = delete;
|
||||
|
||||
template<class DeducedHandler>
|
||||
write_some_op(
|
||||
@@ -728,7 +728,7 @@ async_write_some(bool fin,
|
||||
void(error_code, std::size_t)> init{handler};
|
||||
write_some_op<ConstBufferSequence, BOOST_ASIO_HANDLER_TYPE(
|
||||
WriteHandler, void(error_code, std::size_t))>{
|
||||
init.completion_handler, *this, fin, bs}(
|
||||
std::move(init.completion_handler), *this, fin, bs}(
|
||||
{}, 0, false);
|
||||
return init.result.get();
|
||||
}
|
||||
@@ -784,7 +784,7 @@ async_write(
|
||||
void(error_code, std::size_t)> init{handler};
|
||||
write_some_op<ConstBufferSequence, BOOST_ASIO_HANDLER_TYPE(
|
||||
WriteHandler, void(error_code, std::size_t))>{
|
||||
init.completion_handler, *this, true, bs}(
|
||||
std::move(init.completion_handler), *this, true, bs}(
|
||||
{}, 0, false);
|
||||
return init.result.get();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user