Index: lemon/lgf_reader.h
===================================================================
--- lemon/lgf_reader.h	(revision 319)
+++ lemon/lgf_reader.h	(revision 487)
@@ -391,35 +391,11 @@
   class DigraphReader;
 
-  /// \brief Return a \ref DigraphReader class
-  ///
-  /// This function just returns a \ref DigraphReader class.
-  /// \relates DigraphReader
   template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph,
-                                       std::istream& is = std::cin) {
-    DigraphReader<Digraph> tmp(digraph, is);
-    return tmp;
-  }
-
-  /// \brief Return a \ref DigraphReader class
-  ///
-  /// This function just returns a \ref DigraphReader class.
-  /// \relates DigraphReader
+  DigraphReader<Digraph> digraphReader(Digraph& digraph, 
+                                       std::istream& is = std::cin);
   template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph,
-                                       const std::string& fn) {
-    DigraphReader<Digraph> tmp(digraph, fn);
-    return tmp;
-  }
-
-  /// \brief Return a \ref DigraphReader class
-  ///
-  /// This function just returns a \ref DigraphReader class.
-  /// \relates DigraphReader
+  DigraphReader<Digraph> digraphReader(Digraph& digraph, const std::string& fn);
   template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph, const char* fn) {
-    DigraphReader<Digraph> tmp(digraph, fn);
-    return tmp;
-  }
+  DigraphReader<Digraph> digraphReader(Digraph& digraph, const char *fn);
 
   /// \ingroup lemon_io
@@ -585,10 +561,11 @@
   private:
 
-    friend DigraphReader<Digraph> digraphReader<>(Digraph& digraph,
-                                                  std::istream& is);
-    friend DigraphReader<Digraph> digraphReader<>(Digraph& digraph,
-                                                  const std::string& fn);
-    friend DigraphReader<Digraph> digraphReader<>(Digraph& digraph,
-                                                  const char *fn);
+    template <typename DGR>
+    friend DigraphReader<DGR> digraphReader(DGR& digraph, std::istream& is);
+    template <typename DGR>
+    friend DigraphReader<DGR> digraphReader(DGR& digraph, 
+                                            const std::string& fn);
+    template <typename DGR>
+    friend DigraphReader<DGR> digraphReader(DGR& digraph, const char *fn);
 
     DigraphReader(DigraphReader& other)
@@ -1211,36 +1188,45 @@
   };
 
+  /// \brief Return a \ref DigraphReader class
+  ///
+  /// This function just returns a \ref DigraphReader class.
+  /// \relates DigraphReader
+  template <typename Digraph>
+  DigraphReader<Digraph> digraphReader(Digraph& digraph, std::istream& is) {
+    DigraphReader<Digraph> tmp(digraph, is);
+    return tmp;
+  }
+
+  /// \brief Return a \ref DigraphReader class
+  ///
+  /// This function just returns a \ref DigraphReader class.
+  /// \relates DigraphReader
+  template <typename Digraph>
+  DigraphReader<Digraph> digraphReader(Digraph& digraph,
+                                       const std::string& fn) {
+    DigraphReader<Digraph> tmp(digraph, fn);
+    return tmp;
+  }
+
+  /// \brief Return a \ref DigraphReader class
+  ///
+  /// This function just returns a \ref DigraphReader class.
+  /// \relates DigraphReader
+  template <typename Digraph>
+  DigraphReader<Digraph> digraphReader(Digraph& digraph, const char* fn) {
+    DigraphReader<Digraph> tmp(digraph, fn);
+    return tmp;
+  }
+
   template <typename Graph>
   class GraphReader;
-
-  /// \brief Return a \ref GraphReader class
-  ///
-  /// This function just returns a \ref GraphReader class.
-  /// \relates GraphReader
+ 
   template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, std::istream& is = std::cin) {
-    GraphReader<Graph> tmp(graph, is);
-    return tmp;
-  }
-
-  /// \brief Return a \ref GraphReader class
-  ///
-  /// This function just returns a \ref GraphReader class.
-  /// \relates GraphReader
+  GraphReader<Graph> graphReader(Graph& graph, 
+                                 std::istream& is = std::cin);
   template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, const std::string& fn) {
-    GraphReader<Graph> tmp(graph, fn);
-    return tmp;
-  }
-
-  /// \brief Return a \ref GraphReader class
-  ///
-  /// This function just returns a \ref GraphReader class.
-  /// \relates GraphReader
+  GraphReader<Graph> graphReader(Graph& graph, const std::string& fn);
   template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, const char* fn) {
-    GraphReader<Graph> tmp(graph, fn);
-    return tmp;
-  }
+  GraphReader<Graph> graphReader(Graph& graph, const char *fn);
 
   /// \ingroup lemon_io
@@ -1369,8 +1355,10 @@
 
   private:
-    friend GraphReader<Graph> graphReader<>(Graph& graph, std::istream& is);
-    friend GraphReader<Graph> graphReader<>(Graph& graph,
-                                            const std::string& fn);
-    friend GraphReader<Graph> graphReader<>(Graph& graph, const char *fn);
+    template <typename GR>
+    friend GraphReader<GR> graphReader(GR& graph, std::istream& is);
+    template <typename GR>
+    friend GraphReader<GR> graphReader(GR& graph, const std::string& fn); 
+    template <typename GR>
+    friend GraphReader<GR> graphReader(GR& graph, const char *fn);
 
     GraphReader(GraphReader& other)
@@ -2040,4 +2028,34 @@
 
   };
+
+  /// \brief Return a \ref GraphReader class
+  ///
+  /// This function just returns a \ref GraphReader class.
+  /// \relates GraphReader
+  template <typename Graph>
+  GraphReader<Graph> graphReader(Graph& graph, std::istream& is) {
+    GraphReader<Graph> tmp(graph, is);
+    return tmp;
+  }
+
+  /// \brief Return a \ref GraphReader class
+  ///
+  /// This function just returns a \ref GraphReader class.
+  /// \relates GraphReader
+  template <typename Graph>
+  GraphReader<Graph> graphReader(Graph& graph, const std::string& fn) {
+    GraphReader<Graph> tmp(graph, fn);
+    return tmp;
+  }
+
+  /// \brief Return a \ref GraphReader class
+  ///
+  /// This function just returns a \ref GraphReader class.
+  /// \relates GraphReader
+  template <typename Graph>
+  GraphReader<Graph> graphReader(Graph& graph, const char* fn) {
+    GraphReader<Graph> tmp(graph, fn);
+    return tmp;
+  }
 
   class SectionReader;
