From c54597e0b2262713426f06c402e0e0d28fe60209 Mon Sep 17 00:00:00 2001 From: Soumith Chintala Date: Fri, 3 Feb 2017 11:59:55 +0530 Subject: [PATCH] std::move fixes --- torch/lib/libshm/core.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/torch/lib/libshm/core.cpp b/torch/lib/libshm/core.cpp index 6f8d46eda5330d..a5ae66111b4f0f 100644 --- a/torch/lib/libshm/core.cpp +++ b/torch/lib/libshm/core.cpp @@ -69,7 +69,8 @@ ClientSocket& get_manager_socket(char *manager_handle) { std::string str_handle(manager_handle); auto it = managers.find(str_handle); if (it == managers.end()) { - auto result = managers.emplace(std::move(str_handle), ClientSocket(str_handle)); + auto socket = ClientSocket(str_handle); + auto result = managers.emplace(std::move(str_handle), std::move(socket)); return result.first->second; } else { return it->second;