diff --git a/fairmq/sdk/AsioAsyncOp.h b/fairmq/sdk/AsioAsyncOp.h index 9148fc64..ff64976f 100644 --- a/fairmq/sdk/AsioAsyncOp.h +++ b/fairmq/sdk/AsioAsyncOp.h @@ -49,7 +49,7 @@ struct AsioAsyncOpImpl : AsioAsyncOpImplBase using Executor2 = typename asio::associated_executor::type; /// Ctor - AsioAsyncOpImpl(const Executor1& ex1, Allocator1&& alloc1, Handler&& handler) + AsioAsyncOpImpl(const Executor1& ex1, Allocator1 alloc1, Handler&& handler) : fWork1(ex1) , fWork2(asio::get_associated_executor(handler, ex1)) , fHandler(std::move(handler)) @@ -149,7 +149,7 @@ struct AsioAsyncOp - AsioAsyncOp(Executor&& ex1, Allocator&& alloc1, Handler&& handler) + AsioAsyncOp(Executor ex1, Allocator alloc1, Handler&& handler) : AsioAsyncOp() { // Async operation type to be allocated and constructed @@ -165,8 +165,8 @@ struct AsioAsyncOp::allocate(opAlloc, 1)); // Construct object - auto ptr(new (mem) Op(std::forward(ex1), - std::forward(alloc1), + auto ptr(new (mem) Op(std::move(ex1), + std::move(alloc1), std::forward(handler))); // Assign ownership to this object @@ -177,8 +177,8 @@ struct AsioAsyncOp - AsioAsyncOp(Executor&& ex1, Handler&& handler) - : AsioAsyncOp(std::forward(ex1), Allocator(), std::forward(handler)) + AsioAsyncOp(Executor ex1, Handler&& handler) + : AsioAsyncOp(std::move(ex1), Allocator(), std::forward(handler)) {} /// Ctor with handler #3