From 568d60631c15dd437e96ad5cb6f8fe5a78d6c9e9 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Mon, 10 Apr 2017 13:02:43 -0400 Subject: [PATCH] msg: Remove pessimizing move Do not std::move the result of a function returning a value. (Once could reasonably std::move the result of a function returning an lvalue reference, but *not* that of one returning a value.) Signed-off-by: Adam C. Emerson --- src/msg/async/rdma/RDMAStack.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msg/async/rdma/RDMAStack.cc b/src/msg/async/rdma/RDMAStack.cc index 443ac7fa448..66c7e5634ab 100644 --- a/src/msg/async/rdma/RDMAStack.cc +++ b/src/msg/async/rdma/RDMAStack.cc @@ -526,7 +526,7 @@ RDMAStack::~RDMAStack() void RDMAStack::spawn_worker(unsigned i, std::function &&func) { threads.resize(i+1); - threads[i] = std::move(std::thread(func)); + threads[i] = std::thread(func); } void RDMAStack::join_worker(unsigned i)