Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Define move-assignment and delete copy-assignment operators for xbt::Task.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 14 Mar 2019 12:54:27 +0000 (13:54 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 14 Mar 2019 14:16:13 +0000 (15:16 +0100)
include/xbt/functional.hpp

index 608d372..9ca66f8 100644 (file)
@@ -175,7 +175,8 @@ public:
     vtable_ = that.vtable_;
     that.vtable_ = nullptr;
   }
     vtable_ = that.vtable_;
     that.vtable_ = nullptr;
   }
-  Task& operator=(Task that)
+  Task& operator=(Task const& that) = delete;
+  Task& operator=(Task&& that)
   {
     this->clear();
     if (that.vtable_ && that.vtable_->move)
   {
     this->clear();
     if (that.vtable_ && that.vtable_->move)