[Lemon-commits] [lemon_svn] marci: r584 - hugo/trunk/src/work

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:40:23 CET 2006


Author: marci
Date: Tue Apr 27 11:40:25 2004
New Revision: 584

Modified:
   hugo/trunk/src/work/list_graph.h

Log:
gcc-3.4.0


Modified: hugo/trunk/src/work/list_graph.h
==============================================================================
--- hugo/trunk/src/work/list_graph.h	(original)
+++ hugo/trunk/src/work/list_graph.h	Tue Apr 27 11:40:25 2004
@@ -368,20 +368,20 @@
 
     /* stream operations, for testing purpose */
 
-    friend std::ostream& operator<<(std::ostream& os, const Node& i) { 
-      if (i.valid())
-	os << i.node->id; 
-      else
-	os << "invalid";
-      return os; 
-    }
-    friend std::ostream& operator<<(std::ostream& os, const Edge& i) { 
-      if (i.valid()) 
-	os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; 
-      else 
-	os << "invalid";
-      return os; 
-    }
+//     friend std::ostream& operator<<(std::ostream& os, const Node& i) { 
+//       if (i.valid())
+// 	os << i.node->id; 
+//       else
+// 	os << "invalid";
+//       return os; 
+//     }
+//     friend std::ostream& operator<<(std::ostream& os, const Edge& i) { 
+//       if (i.valid()) 
+// 	os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; 
+//       else 
+// 	os << "invalid";
+//       return os; 
+//     }
 
     class Node {
       friend class ListGraph;
@@ -546,6 +546,21 @@
     };
   };
 
+  std::ostream& operator<<(std::ostream& os, const ListGraph::Node& i) { 
+    if (i.valid())
+      os << i.node->id; 
+    else
+      os << "invalid";
+    return os; 
+  }
+  std::ostream& operator<<(std::ostream& os, const ListGraph::Edge& i) { 
+    if (i.valid()) 
+      os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; 
+    else 
+      os << "invalid";
+    return os; 
+  }
+
   class UndirListGraph : public ListGraph {
   public:
     typedef SymEdgeIt OutEdgeIt;



More information about the Lemon-commits mailing list