Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] asks for std::forward.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 8 Jan 2020 16:32:37 +0000 (17:32 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 8 Jan 2020 17:01:47 +0000 (18:01 +0100)
include/xbt/config.hpp

index 86cfc8e..7dedb71 100644 (file)
@@ -286,7 +286,7 @@ public:
   template<class U>
   Flag& operator=(U const& that) { value_ = that; return *this; }
   template<class U>
-  Flag& operator=(U && that)     { value_ = that; return *this; }
+  Flag& operator=(U&& that) { value_ = std::forward<U>(that); return *this; }
   template<class U>
   bool operator==(U const& that) const { return value_ == that; }
   template<class U>