From: Martin Quinson Date: Fri, 31 Mar 2023 16:33:59 +0000 (+0200) Subject: Try to please the ultramodern clang running on FreeBSD by properly giving a copy... X-Git-Tag: v3.34~238 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/cb495f2fff67af8d686bc9e78b83828bb114c50c Try to please the ultramodern clang running on FreeBSD by properly giving a copy operator to the abstract class too We should stop using the copy operator, and use a nice and clean clone() call instead. Mathieu's on it. --- diff --git a/src/mc/api/strategy/BasicStrategy.hpp b/src/mc/api/strategy/BasicStrategy.hpp index 9c1a482810..dfdbd5d546 100644 --- a/src/mc/api/strategy/BasicStrategy.hpp +++ b/src/mc/api/strategy/BasicStrategy.hpp @@ -11,7 +11,10 @@ namespace simgrid::mc { /** Basic MC guiding class which corresponds to no guide at all (random choice) */ class BasicStrategy : public Strategy { public: - void operator=(const BasicStrategy&) { return; } + void operator=(const BasicStrategy&) + { /* nothing to copy over while cloning */ + return; + } std::pair next_transition() const override { diff --git a/src/mc/api/strategy/Strategy.hpp b/src/mc/api/strategy/Strategy.hpp index dc0cb106e2..c1bf76b415 100644 --- a/src/mc/api/strategy/Strategy.hpp +++ b/src/mc/api/strategy/Strategy.hpp @@ -18,6 +18,11 @@ protected: public: virtual ~Strategy() = default; + void operator=(const Strategy&) + { /* nothing to copy over while cloning */ + return; + } + virtual std::pair next_transition() const = 0; virtual void execute_next(aid_t aid, RemoteApp& app) = 0; virtual void consider_best() = 0;