Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / src / mc / explo / udpor / maximal_subsets_iterator.hpp
index 9f6b4730910fc830db880c8068a27982f36c225a..2c3c07f9418d2f3a0d033c53f5b8631ceeaacd05 100644 (file)
@@ -39,7 +39,6 @@ public:
   using topological_order_position = std::vector<const UnfoldingEvent*>::const_iterator;
 
   maximal_subsets_iterator()                                    = default;
-  maximal_subsets_iterator(maximal_subsets_iterator&&) noexcept = default;
   explicit maximal_subsets_iterator(const Configuration& config,
                                     std::optional<node_filter_function> filter = std::nullopt,
                                     std::optional<size_t> maximum_subset_size  = std::nullopt)
@@ -59,7 +58,7 @@ private:
   bool has_started_searching                              = false;
   std::optional<size_t> maximum_subset_size               = std::nullopt;
   std::optional<EventSet> current_maximal_set             = std::nullopt;
-  std::stack<topological_order_position> backtrack_points = std::stack<topological_order_position>();
+  std::stack<topological_order_position, std::vector<topological_order_position>> backtrack_points;
 
   /**
    * @brief A small class which provides functionality for managing
@@ -71,15 +70,10 @@ private:
    * with events that are its current maximal event set (i.e.
    * its `current_maximal_set`)
    */
-  struct bookkeeper {
+  struct Bookkeeper {
   public:
     using topological_order_position = maximal_subsets_iterator::topological_order_position;
 
-    bookkeeper()                        = default;
-    bookkeeper(bookkeeper&&)            = default;
-    bookkeeper& operator=(bookkeeper&)  = default;
-    bookkeeper& operator=(bookkeeper&&) = default;
-
     void mark_included_in_maximal_set(const UnfoldingEvent*);
     void mark_removed_from_maximal_set(const UnfoldingEvent*);
     topological_order_position find_next_candidate_event(topological_order_position first,
@@ -92,7 +86,8 @@ private:
     /// bookkeeping that has been done thus far, can be added to the
     /// current candidate maximal set
     bool is_candidate_event(const UnfoldingEvent*) const;
-  } bookkeeper;
+  };
+  Bookkeeper bookkeeper;
 
   void add_element_to_current_maximal_set(const UnfoldingEvent*);
   void remove_element_from_current_maximal_set(const UnfoldingEvent*);