Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
IIUC return std::move(...) is discouraged.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 12 Mar 2019 15:01:39 +0000 (16:01 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 12 Mar 2019 15:41:48 +0000 (16:41 +0100)
include/simgrid/kernel/future.hpp
include/xbt/config.hpp

index b006a5e..374d0ee 100644 (file)
@@ -157,7 +157,7 @@ public:
     xbt_assert(this->value_);
     auto result = std::move(this->value_.get());
     this->value_ = boost::optional<T>();
-    return std::move(result);
+    return result;
   }
 
 private:
@@ -426,7 +426,7 @@ template <class T> Future<T> unwrap_future(Future<Future<T>> future)
   Promise<T> promise;
   Future<T> result = promise.get_future();
   bind_promise(std::move(promise), std::move(future));
-  return std::move(result);
+  return result;
 }
 
 /** Producer side of a @ref simgrid::kernel::Future
index b6f60f0..1a04a57 100644 (file)
@@ -41,7 +41,7 @@ inline std::string const& to_string(std::string const& value)
 }
 inline std::string to_string(std::string&& value)
 {
-  return std::move(value);
+  return value;
 }
 
 // Set default