From 74c5de07784abf609331bcf7242145cc4affdaab Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 14 Mar 2019 13:54:27 +0100 Subject: [PATCH] Define move-assignment and delete copy-assignment operators for xbt::Task. --- include/xbt/functional.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/xbt/functional.hpp b/include/xbt/functional.hpp index 608d372891..9ca66f816e 100644 --- a/include/xbt/functional.hpp +++ b/include/xbt/functional.hpp @@ -175,7 +175,8 @@ public: 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) -- 2.20.1