# HG changeset patch # User Alpar Juttner # Date 1595964216 -7200 # Node ID da87dbdf3daf3022d0b43a237ce64d84d8a96e47 # Parent 4a170261cc5456d767ca6f06e03b9d2a96b2ff51 Resolve deprecation warnings of gcc 9 (#633) diff -r 4a170261cc54 -r da87dbdf3daf lemon/concepts/bpgraph.h --- a/lemon/concepts/bpgraph.h Thu Feb 25 09:46:12 2021 +0100 +++ b/lemon/concepts/bpgraph.h Tue Jul 28 21:23:36 2020 +0200 @@ -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 -r 4a170261cc54 -r da87dbdf3daf lemon/concepts/digraph.h --- a/lemon/concepts/digraph.h Thu Feb 25 09:46:12 2021 +0100 +++ b/lemon/concepts/digraph.h Tue Jul 28 21:23:36 2020 +0200 @@ -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(nm) { } + public: ///Assignment operator + NodeMap& operator=(const NodeMap&) { + return *this; + } + ///Template Assignment operator template NodeMap& operator=(const CMap&) { checkConcept, CMap>(); @@ -547,6 +587,10 @@ ArcMap(const ArcMap& em) : ReferenceMap(em) { } ///Assignment operator + ArcMap& operator=(const ArcMap&) { + return *this; + } + ///Template Assignment operator template ArcMap& operator=(const CMap&) { checkConcept, CMap>(); diff -r 4a170261cc54 -r da87dbdf3daf lemon/concepts/graph.h --- a/lemon/concepts/graph.h Thu Feb 25 09:46:12 2021 +0100 +++ b/lemon/concepts/graph.h Tue Jul 28 21:23:36 2020 +0200 @@ -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. + /// + const Edge &operator=(const Edge&) { return *this; } + /// %Invalid constructor \& conversion. /// Initializes the object to be invalid. @@ -266,6 +283,12 @@ /// 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. @@ -335,6 +358,12 @@ /// 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. @@ -396,6 +425,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. @@ -450,6 +485,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. @@ -518,6 +559,12 @@ /// 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. @@ -587,6 +634,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. @@ -651,6 +704,10 @@ NodeMap(const NodeMap& nm) : ReferenceMap(nm) { } ///Assignment operator + NodeMap& operator=(const NodeMap&) { + return *this; + } + ///Template Assignment operator template NodeMap& operator=(const CMap&) { checkConcept, CMap>(); @@ -677,6 +734,10 @@ ArcMap(const ArcMap& em) : ReferenceMap(em) { } ///Assignment operator + ArcMap& operator=(const ArcMap&) { + return *this; + } + ///Template Assignment operator template ArcMap& operator=(const CMap&) { checkConcept, CMap>(); @@ -703,6 +764,10 @@ EdgeMap(const EdgeMap& em) : ReferenceMap(em) {} ///Assignment operator + EdgeMap& operator=(const EdgeMap&) { + return *this; + } + ///Template Assignment operator template EdgeMap& operator=(const CMap&) { checkConcept, CMap>(); diff -r 4a170261cc54 -r da87dbdf3daf lemon/concepts/graph_components.h --- a/lemon/concepts/graph_components.h Thu Feb 25 09:46:12 2021 +0100 +++ b/lemon/concepts/graph_components.h Tue Jul 28 21:23:36 2020 +0200 @@ -219,6 +219,12 @@ /// Copy constructor. Edge(const Edge &) : Parent() {} + /// Assignment operator + + /// Assignment operator. + /// + const Edge &operator=(const Edge&) { return *this; } + /// \brief Constructor for conversion from \c INVALID. /// /// Constructor for conversion from \c INVALID. @@ -336,6 +342,11 @@ /// /// Copy constructor. RedNode(const RedNode &) : Parent() {} + /// Assignment operator + + /// Assignment operator. + /// + const RedNode &operator=(const RedNode&) { return *this; } /// \brief Constructor for conversion from \c INVALID. /// @@ -365,6 +376,12 @@ /// /// Copy constructor. BlueNode(const BlueNode &) : Parent() {} + /// Assignment operator + + /// Assignment operator. + /// + const BlueNode &operator=(const BlueNode&) { return *this; } + /// \brief Constructor for conversion from \c INVALID. /// diff -r 4a170261cc54 -r da87dbdf3daf lemon/dim2.h --- a/lemon/dim2.h Thu Feb 25 09:46:12 2021 +0100 +++ b/lemon/dim2.h Tue Jul 28 21:23:36 2020 +0200 @@ -54,7 +54,7 @@ T y; ///Default constructor - Point() {} + Point() : x(), y() {} ///Construct an instance from coordinates Point(T a, T b) : x(a), y(b) { } diff -r 4a170261cc54 -r da87dbdf3daf lemon/list_graph.h --- a/lemon/list_graph.h Thu Feb 25 09:46:12 2021 +0100 +++ b/lemon/list_graph.h Tue Jul 28 21:23:36 2020 +0200 @@ -1657,6 +1657,7 @@ RedNode() {} RedNode(const RedNode& node) : Node(node) {} RedNode(Invalid) : Node(INVALID){} + const RedNode& operator=(const RedNode& node) { Node::operator=(node); return *this;} }; class BlueNode : public Node { @@ -1669,6 +1670,7 @@ BlueNode() {} BlueNode(const BlueNode& node) : Node(node) {} BlueNode(Invalid) : Node(INVALID){} + const BlueNode& operator=(const BlueNode& node) { Node::operator=(node); return *this;} }; class Edge { diff -r 4a170261cc54 -r da87dbdf3daf lemon/maps.h --- a/lemon/maps.h Thu Feb 25 09:46:12 2021 +0100 +++ b/lemon/maps.h Tue Jul 28 21:23:36 2020 +0200 @@ -294,10 +294,13 @@ private: - RangeMap& operator=(const RangeMap&); + // RangeMap& operator=(const RangeMap&); public: + // ///\e + // RangeMap(const RangeMap&); + ///\e Reference operator[](const Key &k) { return _vector[k]; diff -r 4a170261cc54 -r da87dbdf3daf lemon/smart_graph.h --- a/lemon/smart_graph.h Thu Feb 25 09:46:12 2021 +0100 +++ b/lemon/smart_graph.h Tue Jul 28 21:23:36 2020 +0200 @@ -863,7 +863,8 @@ public: RedNode() {} RedNode(const RedNode& node) : Node(node) {} - RedNode(Invalid) : Node(INVALID){} + RedNode(Invalid) : Node(INVALID) {} + const RedNode& operator=(const RedNode& node) { Node::operator=(node); return *this;} }; class BlueNode : public Node { @@ -876,6 +877,7 @@ BlueNode() {} BlueNode(const BlueNode& node) : Node(node) {} BlueNode(Invalid) : Node(INVALID){} + const BlueNode& operator=(const BlueNode& node) { Node::operator=(node); return *this;} }; class Edge { diff -r 4a170261cc54 -r da87dbdf3daf test/maps_test.cc --- a/test/maps_test.cc Thu Feb 25 09:46:12 2021 +0100 +++ b/test/maps_test.cc Tue Jul 28 21:23:36 2020 +0200 @@ -61,6 +61,9 @@ typedef A argument_type; typedef B result_type; + F() {}; + F(const F&) {}; + B operator()(const A&) const { return B(); } private: F& operator=(const F&);