[Lemon-commits] Alpar Juttner: Resolve deprecation warnings of g...
Lemon HG
hg at lemon.cs.elte.hu
Thu Feb 25 10:24:26 CET 2021
details: http://lemon.cs.elte.hu/hg/lemon/rev/da87dbdf3daf
changeset: 1432:da87dbdf3daf
user: Alpar Juttner <alpar [at] cs.elte.hu>
date: Tue Jul 28 21:23:36 2020 +0200
description:
Resolve deprecation warnings of gcc 9 (#633)
diffstat:
lemon/concepts/bpgraph.h | 66 +++++++++++++++++++++++++++++++++++++++
lemon/concepts/digraph.h | 44 ++++++++++++++++++++++++++
lemon/concepts/graph.h | 65 ++++++++++++++++++++++++++++++++++++++
lemon/concepts/graph_components.h | 17 ++++++++++
lemon/dim2.h | 2 +-
lemon/list_graph.h | 2 +
lemon/maps.h | 5 ++-
lemon/smart_graph.h | 4 +-
test/maps_test.cc | 3 +
9 files changed, 205 insertions(+), 3 deletions(-)
diffs (truncated from 540 to 300 lines):
diff --git a/lemon/concepts/bpgraph.h b/lemon/concepts/bpgraph.h
--- a/lemon/concepts/bpgraph.h
+++ b/lemon/concepts/bpgraph.h
@@ -95,6 +95,11 @@
/// Copy constructor.
///
Node(const Node&) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const Node &operator=(const Node&) { return *this; }
/// %Invalid constructor \& conversion.
@@ -143,6 +148,11 @@
/// Copy constructor.
///
RedNode(const RedNode&) : Node() { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const RedNode &operator=(const RedNode&) { return *this; }
/// %Invalid constructor \& conversion.
@@ -170,6 +180,12 @@
/// Copy constructor.
///
BlueNode(const BlueNode&) : Node() { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const BlueNode &operator=(const BlueNode&) { return *this; }
+
/// %Invalid constructor \& conversion.
@@ -200,6 +216,11 @@
/// Copy constructor.
///
RedNodeIt(const RedNodeIt& n) : RedNode(n) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const RedNodeIt &operator=(const RedNodeIt&) { return *this; }
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
@@ -259,6 +280,11 @@
/// Copy constructor.
///
BlueNodeIt(const BlueNodeIt& n) : BlueNode(n) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const BlueNodeIt &operator=(const BlueNodeIt&) { return *this; }
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
@@ -318,6 +344,11 @@
/// Copy constructor.
///
NodeIt(const NodeIt& n) : Node(n) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const NodeIt &operator=(const NodeIt&) { return *this; }
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
@@ -374,6 +405,11 @@
/// Copy constructor.
///
Edge(const Edge&) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const Edge &operator=(const Edge&) { return *this; }
/// %Invalid constructor \& conversion.
/// Initializes the object to be invalid.
@@ -422,6 +458,11 @@
/// Copy constructor.
///
EdgeIt(const EdgeIt& e) : Edge(e) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const EdgeIt &operator=(const EdgeIt&) { return *this; }
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
@@ -487,6 +528,11 @@
/// Copy constructor.
///
IncEdgeIt(const IncEdgeIt& e) : Edge(e) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const IncEdgeIt &operator=(const IncEdgeIt&) { return *this; }
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
@@ -545,6 +591,11 @@
/// Copy constructor.
///
Arc(const Arc&) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const Arc &operator=(const Arc&) { return *this; }
/// %Invalid constructor \& conversion.
/// Initializes the object to be invalid.
@@ -599,6 +650,11 @@
/// Copy constructor.
///
ArcIt(const ArcIt& e) : Arc(e) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const ArcIt &operator=(const ArcIt&) { return *this; }
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
@@ -664,6 +720,11 @@
/// Copy constructor.
///
OutArcIt(const OutArcIt& e) : Arc(e) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const OutArcIt &operator=(const OutArcIt&) { return *this; }
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
@@ -730,6 +791,11 @@
/// Copy constructor.
///
InArcIt(const InArcIt& e) : Arc(e) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const InArcIt &operator=(const InArcIt&) { return *this; }
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
diff --git a/lemon/concepts/digraph.h b/lemon/concepts/digraph.h
--- a/lemon/concepts/digraph.h
+++ b/lemon/concepts/digraph.h
@@ -77,6 +77,12 @@
///
Node(const Node&) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const Node &operator=(const Node&) { return *this; }
+
/// %Invalid constructor \& conversion.
/// Initializes the object to be invalid.
@@ -126,6 +132,12 @@
/// Copy constructor.
///
NodeIt(const NodeIt& n) : Node(n) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const NodeIt &operator=(const NodeIt&) { return *this; }
+
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
@@ -185,6 +197,12 @@
/// Copy constructor.
///
Arc(const Arc&) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const Arc &operator=(const Arc&) { return *this; }
+
/// %Invalid constructor \& conversion.
/// Initializes the object to be invalid.
@@ -235,6 +253,11 @@
/// Copy constructor.
///
OutArcIt(const OutArcIt& e) : Arc(e) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const OutArcIt &operator=(const OutArcIt&) { return *this; }
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
@@ -301,6 +324,12 @@
/// Copy constructor.
///
InArcIt(const InArcIt& e) : Arc(e) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const InArcIt &operator=(const InArcIt&) { return *this; }
+
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
@@ -365,6 +394,12 @@
/// Copy constructor.
///
ArcIt(const ArcIt& e) : Arc(e) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const ArcIt &operator=(const ArcIt&) { return *this; }
+
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
@@ -521,7 +556,12 @@
///Copy constructor
NodeMap(const NodeMap& nm) :
ReferenceMap<Node, T, T&, const T&>(nm) { }
+ public:
///Assignment operator
+ NodeMap& operator=(const NodeMap&) {
+ return *this;
+ }
+ ///Template Assignment operator
template <typename CMap>
NodeMap& operator=(const CMap&) {
checkConcept<ReadMap<Node, T>, CMap>();
@@ -547,6 +587,10 @@
ArcMap(const ArcMap& em) :
ReferenceMap<Arc, T, T&, const T&>(em) { }
///Assignment operator
+ ArcMap& operator=(const ArcMap&) {
+ return *this;
+ }
+ ///Template Assignment operator
template <typename CMap>
ArcMap& operator=(const CMap&) {
checkConcept<ReadMap<Arc, T>, CMap>();
diff --git a/lemon/concepts/graph.h b/lemon/concepts/graph.h
--- a/lemon/concepts/graph.h
+++ b/lemon/concepts/graph.h
@@ -108,6 +108,11 @@
/// Copy constructor.
///
Node(const Node&) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const Node &operator=(const Node&) { return *this; }
/// %Invalid constructor \& conversion.
@@ -159,6 +164,12 @@
/// Copy constructor.
///
NodeIt(const NodeIt& n) : Node(n) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
+ const NodeIt &operator=(const NodeIt&) { return *this; }
+
/// %Invalid constructor \& conversion.
/// Initializes the iterator to be invalid.
@@ -218,6 +229,12 @@
/// Copy constructor.
///
Edge(const Edge&) { }
+ /// Assignment operator
+
+ /// Assignment operator.
+ ///
More information about the Lemon-commits
mailing list