Index: benchmark/bench_tools.h
===================================================================
--- benchmark/bench_tools.h	(revision 1689)
+++ benchmark/bench_tools.h	(revision 1756)
@@ -6,23 +6,6 @@
 #include<iostream>
 
+#include<lemon/graph_utils.h>
 #include<lemon/time_measure.h>
-
-///An experimental typedef factory
-#define GRAPH_TYPEDEF_FACTORY(Graph) \
-   typedef typename Graph::   Node      Node;\
-   typedef typename Graph::   NodeIt    NodeIt;\
-   typedef typename Graph::   Edge      Edge;\
-   typedef typename Graph::   EdgeIt    EdgeIt;\
-   typedef typename Graph:: InEdgeIt  InEdgeIt;\
-   typedef typename Graph::OutEdgeIt OutEdgeIt;
-
-#define GRAPH_TYPEDEF_FACTORY_NOTYPENAME(Graph) \
-   typedef Graph::   Node      Node;\
-   typedef Graph::   NodeIt    NodeIt;\
-   typedef Graph::   Edge      Edge;\
-   typedef Graph::   EdgeIt    EdgeIt;\
-   typedef Graph:: InEdgeIt  InEdgeIt;\
-   typedef Graph::OutEdgeIt OutEdgeIt;
- 
 
 ///A primitive primtest
@@ -94,5 +77,5 @@
 void addHyperCube(Graph &G,int dim,std::vector<typename Graph::Node> &nodes)
 {
-  GRAPH_TYPEDEF_FACTORY(Graph);
+  GRAPH_TYPEDEFS(typename Graph);
   
   std::vector<int> bits(dim+1);
@@ -110,5 +93,5 @@
 void addBiDirHyperCube(Graph &G,int dim,std::vector<typename Graph::Node>&nodes)
 {
-  GRAPH_TYPEDEF_FACTORY(Graph);
+  GRAPH_TYPEDEFS(typename Graph);
   
   std::vector<int> bits(dim+1);
Index: benchmark/bfs-bench.cc
===================================================================
--- benchmark/bfs-bench.cc	(revision 1689)
+++ benchmark/bfs-bench.cc	(revision 1756)
@@ -32,5 +32,5 @@
 void bfsStlQueue(Graph &G,typename Graph::Node source)
 {
-  GRAPH_TYPEDEF_FACTORY(Graph);
+  GRAPH_TYPEDEFS(typename Graph);
 
   using namespace std;
@@ -57,5 +57,5 @@
 void bfsOwnQueue(Graph &G,typename Graph::Node source)
 {
-  GRAPH_TYPEDEF_FACTORY(Graph);
+  GRAPH_TYPEDEFS(typename Graph);
 
   using namespace std;
@@ -85,5 +85,5 @@
 void iteratorBench(Graph &G)
 {
-  GRAPH_TYPEDEF_FACTORY(Graph);
+  GRAPH_TYPEDEFS(typename Graph);
 
   int i=0;
@@ -98,6 +98,5 @@
   typedef SmartGraph Graph;
 
-  ///\bug GRAPH_TYPEDEF_FACTORY(Graph);
-  GRAPH_TYPEDEF_FACTORY_NOTYPENAME(Graph);
+  GRAPH_TYPEDEFS(Graph);
 
   Graph G;
Index: benchmark/graph-bench.cc
===================================================================
--- benchmark/graph-bench.cc	(revision 1435)
+++ benchmark/graph-bench.cc	(revision 1756)
@@ -15,5 +15,5 @@
 void makeFullGraph(int n, int rat, int p)
 {
-  GRAPH_TYPEDEF_FACTORY(Graph);
+  GRAPH_TYPEDEFS(typename Graph);
 
   Graph G;
Index: benchmark/hcube.cc
===================================================================
--- benchmark/hcube.cc	(revision 1689)
+++ benchmark/hcube.cc	(revision 1756)
@@ -37,6 +37,5 @@
   typedef SmartGraph Graph;
 
-  ///\bug GRAPH_TYPEDEF_FACTORY(Graph);
-  GRAPH_TYPEDEF_FACTORY_NOTYPENAME(Graph);
+  GRAPH_TYPEDEFS(Graph);
 
   Graph G;
Index: lemon/graph_utils.h
===================================================================
--- lemon/graph_utils.h	(revision 1730)
+++ lemon/graph_utils.h	(revision 1756)
@@ -41,4 +41,44 @@
   /// @{
 
+  ///Creates convenience typedefs for the graph types and iterators
+
+  ///This \c \#define creates convenience typedefs for the following types
+  ///of \c Graph: \c Node,  \c NodeIt, \c Edge, \c EdgeIt, \c InEdgeIt,
+  ///\c OutEdgeIt.
+  ///\note If \c G it a template parameter, it should be used in this way.
+  ///\code
+  ///  GRAPH_TYPEDEFS(typename G)
+  ///\endcode
+  ///
+  ///\warning There are no typedefs for the graph maps because of the lack of
+  ///template typedefs in C++.
+#define GRAPH_TYPEDEFS(Graph)			\
+  typedef Graph::     Node      Node;		\
+    typedef Graph::   NodeIt    NodeIt;		\
+    typedef Graph::   Edge      Edge;		\
+    typedef Graph::   EdgeIt    EdgeIt;		\
+    typedef Graph:: InEdgeIt  InEdgeIt;		\
+    typedef Graph::OutEdgeIt OutEdgeIt;
+  
+  ///Creates convenience typedefs for the undirected graph types and iterators
+
+  ///This \c \#define creates the same convenience typedefs as defined by
+  ///\ref GRAPH_TYPEDEFS(Graph) and three more, namely it creates
+  ///\c UndirEdge, \c UndirEdgeIt, \c IncEdgeIt,
+  ///
+  ///\note If \c G it a template parameter, it should be used in this way.
+  ///\code
+  ///  UNDIRGRAPH_TYPEDEFS(typename G)
+  ///\endcode
+  ///
+  ///\warning There are no typedefs for the graph maps because of the lack of
+  ///template typedefs in C++.
+#define UNDIRGRAPH_TYPEDEFS(Graph)			\
+  GRAPH_TYPEDEFS(Graph)					\
+    typedef Graph:: UndirEdge   UndirEdge;		\
+    typedef Graph:: UndirEdgeIt UndirEdgeIt;		\
+    typedef Graph:: IncEdgeIt   IncEdgeIt;
+
+
   /// \brief Function to count the items in the graph.
   ///
