From cb495f2fff67af8d686bc9e78b83828bb114c50c Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 31 Mar 2023 18:33:59 +0200 Subject: [PATCH] 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. --- src/mc/api/strategy/BasicStrategy.hpp | 5 ++++- src/mc/api/strategy/Strategy.hpp | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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; -- 2.20.1