Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Delete copy assignment operator when copy constructor is already deleted.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 8 Apr 2018 20:21:37 +0000 (22:21 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 8 Apr 2018 21:26:08 +0000 (23:26 +0200)
examples/s4u/app-bittorrent/s4u-peer.hpp
examples/s4u/app-bittorrent/s4u-tracker.hpp
examples/s4u/dht-chord/s4u-dht-chord.hpp
src/include/xbt/parmap.hpp
src/simdag/simdag_private.hpp
src/xbt/xbt_replay.cpp

index 9d1e195..1f4fe9a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2017. The SimGrid Team.
+/* Copyright (c) 2012-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -50,6 +50,7 @@ class Peer {
 public:
   explicit Peer(std::vector<std::string> args);
   Peer(const Peer&) = delete;
 public:
   explicit Peer(std::vector<std::string> args);
   Peer(const Peer&) = delete;
+  Peer& operator=(const Peer&) = delete;
   ~Peer();
   void operator()();
 
   ~Peer();
   void operator()();
 
index d167dc0..7c98101 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014, 2017. The SimGrid Team.
+/* Copyright (c) 2012-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -26,7 +26,8 @@ class TrackerAnswer {
   std::set<int>* peers; // the peer list the peer has asked for.
 public:
   explicit TrackerAnswer(int /*interval*/) /*: interval(interval)*/ { peers = new std::set<int>; }
   std::set<int>* peers; // the peer list the peer has asked for.
 public:
   explicit TrackerAnswer(int /*interval*/) /*: interval(interval)*/ { peers = new std::set<int>; }
-  TrackerAnswer(const TrackerAnswer&)                               = delete;
+  TrackerAnswer(const TrackerAnswer&)                                       = delete;
+  TrackerAnswer& operator=(const TrackerAnswer&) = delete;
   ~TrackerAnswer() { delete peers; };
   void addPeer(int peer) { peers->insert(peer); }
   std::set<int>* getPeers() { return peers; }
   ~TrackerAnswer() { delete peers; };
   void addPeer(int peer) { peers->insert(peer); }
   std::set<int>* getPeers() { return peers; }
index 016cba3..74ddd3a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2016-2018. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -88,6 +88,7 @@ class Node {
 public:
   explicit Node(std::vector<std::string> args);
   Node(const Node&) = delete;
 public:
   explicit Node(std::vector<std::string> args);
   Node(const Node&) = delete;
+  Node& operator=(const Node&) = delete;
   ~Node();
   void join(int known_id);
   void leave();
   ~Node();
   void join(int known_id);
   void leave();
index 3eeb6a2..3aeaf19 100644 (file)
@@ -1,6 +1,6 @@
 /* A thread pool (C++ version).                                             */
 
 /* A thread pool (C++ version).                                             */
 
-/* Copyright (c) 2004-2017 The SimGrid Team.
+/* Copyright (c) 2004-2018 The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -39,6 +39,7 @@ template <typename T> class Parmap {
 public:
   Parmap(unsigned num_workers, e_xbt_parmap_mode_t mode);
   Parmap(const Parmap&) = delete;
 public:
   Parmap(unsigned num_workers, e_xbt_parmap_mode_t mode);
   Parmap(const Parmap&) = delete;
+  Parmap& operator=(const Parmap&) = delete;
   ~Parmap();
   void apply(void (*fun)(T), const std::vector<T>& data);
   boost::optional<T> next();
   ~Parmap();
   void apply(void (*fun)(T), const std::vector<T>& data);
   boost::optional<T> next();
index 826b800..b2d2bc5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2017. The SimGrid Team.
+/* Copyright (c) 2006-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -22,6 +22,7 @@ class Global {
 public:
   explicit Global();
   Global(const Global&) = delete;
 public:
   explicit Global();
   Global(const Global&) = delete;
+  Global& operator=(const Global&) = delete;
   ~Global();
   bool watch_point_reached;      /* has a task just reached a watch point? */
   std::set<SD_task_t> *initial_tasks;
   ~Global();
   bool watch_point_reached;      /* has a task just reached a watch point? */
   std::set<SD_task_t> *initial_tasks;
index a266f7e..e95ccb4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2012-2015, 2017. The SimGrid Team.
+/* Copyright (c) 2010, 2012-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -40,6 +40,7 @@ public:
     xbt_assert(fs->is_open(), "Cannot read replay file '%s'", filename);
   }
   ReplayReader(const ReplayReader&) = delete;
     xbt_assert(fs->is_open(), "Cannot read replay file '%s'", filename);
   }
   ReplayReader(const ReplayReader&) = delete;
+  ReplayReader& operator=(const ReplayReader&) = delete;
   ~ReplayReader()
   {
     delete fs;
   ~ReplayReader()
   {
     delete fs;