Bugfixes to compile w. gcc 4.0.0
1.1 --- a/lemon/graph_utils.h Wed Jun 08 16:36:01 2005 +0000
1.2 +++ b/lemon/graph_utils.h Wed Jun 08 20:52:18 2005 +0000
1.3 @@ -863,9 +863,9 @@
1.4 ///
1.5 template <typename _Graph>
1.6 class InDegMap :
1.7 - protected _Graph::AlterationNotifier<typename _Graph::Node>::
1.8 + protected _Graph::template AlterationNotifier<typename _Graph::Node>::
1.9 ObserverBase,
1.10 - protected _Graph::AlterationNotifier<typename _Graph::Edge>::
1.11 + protected _Graph::template AlterationNotifier<typename _Graph::Edge>::
1.12 ObserverBase
1.13 {
1.14 typename _Graph::template NodeMap<int> deg;
1.15 @@ -879,21 +879,21 @@
1.16 /// Constructor for creating in-degree map.
1.17 InDegMap(const _Graph& _graph) : graph(_graph), deg(graph,0)
1.18 {
1.19 - typename _Graph::AlterationNotifier<typename _Graph::Node>::ObserverBase::
1.20 - attach(graph->getNotifier(typename _Graph::Node()));
1.21 - typename _Graph::AlterationNotifier<typename _Graph::Edge>::ObserverBase::
1.22 - attach(graph->getNotifier(typename _Graph::Edge()));
1.23 + typename _Graph::template AlterationNotifier<typename _Graph::Node>
1.24 + ::ObserverBase::attach(graph->getNotifier(typename _Graph::Node()));
1.25 + typename _Graph::template AlterationNotifier<typename _Graph::Edge>
1.26 + ::ObserverBase::attach(graph->getNotifier(typename _Graph::Edge()));
1.27
1.28 - for(typename _Graph::NodeIt n(g);n!=INVALID;++n)
1.29 - for(typename _Graph::InEdgeIt e(g,n);e!=INVALID;++e)
1.30 + for(typename _Graph::NodeIt n(graph);n!=INVALID;++n)
1.31 + for(typename _Graph::InEdgeIt e(graph,n);e!=INVALID;++e)
1.32 deg[e]++;
1.33 }
1.34
1.35 ~InDegMap()
1.36 {
1.37 - typename _Graph::AlterationNotifier<typename _Graph::Node>::
1.38 + typename _Graph::template AlterationNotifier<typename _Graph::Node>::
1.39 ObserverBase::detach();
1.40 - typename _Graph::AlterationNotifier<typename _Graph::Edge>::
1.41 + typename _Graph::template AlterationNotifier<typename _Graph::Edge>::
1.42 ObserverBase::detach();
1.43 }
1.44
1.45 @@ -904,15 +904,14 @@
1.46 virtual void add(const typename _Graph::Node& n) {
1.47 ///\bug Which 'add' comes before to other?
1.48 deg[n]=0;
1.49 - };
1.50 + }
1.51 virtual void erase(const typename _Graph::Node&)
1.52 {
1.53 }
1.54 - virtual void add(const typename _Graph::Edge& n) {
1.55 + virtual void add(const typename _Graph::Edge& e) {
1.56 deg[graph.target(e)]++;
1.57 - };
1.58 - virtual void erase(const typename _Graph::Edge&)
1.59 - {
1.60 + }
1.61 + virtual void erase(const typename _Graph::Edge& e) {
1.62 deg[graph.target(e)]--;
1.63 }
1.64