@@ -52,7 +52,7 @@ void cb(librados::completion_t, void* arg) {
5252
5353template <typename Op>
5454Aio::OpFunc aio_abstract (librados::IoCtx ctx, Op&& op, jspan_context* trace_ctx = nullptr ) {
55- return [ctx = std::move (ctx), op = std::move (op), trace_ctx] (Aio* aio, AioResult& r) mutable {
55+ return [ctx = std::move (ctx), op = std::forward<Op> (op), trace_ctx] (Aio* aio, AioResult& r) mutable {
5656 constexpr bool read = std::is_same_v<std::decay_t <Op>, librados::ObjectReadOperation>;
5757 // use placement new to construct the rados state inside of user_data
5858 auto s = new (&r.user_data ) state (aio, ctx, r);
@@ -92,7 +92,7 @@ template <typename Op>
9292Aio::OpFunc aio_abstract (librados::IoCtx ctx, Op&& op,
9393 boost::asio::yield_context yield,
9494 jspan_context* trace_ctx) {
95- return [ctx = std::move (ctx), op = std::move (op), yield, trace_ctx] (Aio* aio, AioResult& r) mutable {
95+ return [ctx = std::move (ctx), op = std::forward<Op> (op), yield, trace_ctx] (Aio* aio, AioResult& r) mutable {
9696 // arrange for the completion Handler to run on the yield_context's strand
9797 // executor so it can safely call back into Aio without locking
9898 auto ex = yield.get_executor ();
0 commit comments