Index: lemon/concepts/digraph.h
===================================================================
--- lemon/concepts/digraph.h	(revision 61)
+++ lemon/concepts/digraph.h	(revision 107)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library
  *
- * Copyright (C) 2003-2007
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/concepts/graph.h
===================================================================
--- lemon/concepts/graph.h	(revision 61)
+++ lemon/concepts/graph.h	(revision 107)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library
  *
- * Copyright (C) 2003-2007
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -64,5 +64,5 @@
     /// the EdgeMap to map values for the edges. The InArcIt and
     /// OutArcIt iterates on the same edges but with opposite
-    /// direction. The IncArcIt iterates also on the same edges
+    /// direction. The IncEdgeIt iterates also on the same edges
     /// as the OutArcIt and InArcIt but it is not convertible to Arc just
     /// to Edge.  
@@ -271,39 +271,39 @@
       ///\code
       /// int count=0;
-      /// for(Graph::IncArcIt e(g, n); e!=INVALID; ++e) ++count;
+      /// for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count;
       ///\endcode
-      class IncArcIt : public Edge {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        IncArcIt() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        IncArcIt(const IncArcIt& e) : Edge(e) { }
-        /// Initialize the iterator to be invalid.
-
-        /// Initialize the iterator to be invalid.
-        ///
-        IncArcIt(Invalid) { }
+      class IncEdgeIt : public Edge {
+      public:
+        /// Default constructor
+
+        /// @warning The default constructor sets the iterator
+        /// to an undefined value.
+        IncEdgeIt() { }
+        /// Copy constructor.
+
+        /// Copy constructor.
+        ///
+        IncEdgeIt(const IncEdgeIt& e) : Edge(e) { }
+        /// Initialize the iterator to be invalid.
+
+        /// Initialize the iterator to be invalid.
+        ///
+        IncEdgeIt(Invalid) { }
         /// This constructor sets the iterator to first incident arc.
     
         /// This constructor set the iterator to the first incident arc of
         /// the node.
-        IncArcIt(const Graph&, const Node&) { }
-        /// Edge -> IncArcIt conversion
+        IncEdgeIt(const Graph&, const Node&) { }
+        /// Edge -> IncEdgeIt conversion
 
         /// Sets the iterator to the value of the trivial iterator \c e.
         /// This feature necessitates that each time we 
         /// iterate the arc-set, the iteration order is the same.
-        IncArcIt(const Graph&, const Edge&) { }
+        IncEdgeIt(const Graph&, const Edge&) { }
         /// Next incident arc
 
         /// Assign the iterator to the next incident arc
 	/// of the corresponding node.
-        IncArcIt& operator++() { return *this; }
+        IncEdgeIt& operator++() { return *this; }
       };
 
@@ -721,5 +721,5 @@
       ///
       /// Returns the base node of the iterator
-      Node baseNode(IncArcIt) const {
+      Node baseNode(IncEdgeIt) const {
 	return INVALID;
       }
@@ -728,5 +728,5 @@
       ///
       /// Returns the running node of the iterator
-      Node runningNode(IncArcIt) const {
+      Node runningNode(IncEdgeIt) const {
 	return INVALID;
       }
Index: lemon/concepts/graph_components.h
===================================================================
--- lemon/concepts/graph_components.h	(revision 57)
+++ lemon/concepts/graph_components.h	(revision 107)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library
  *
- * Copyright (C) 2003-2007
+ * Copyright (C) 2003-2008
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
@@ -829,14 +829,14 @@
       /// This iterator goes trough the incident arcs of a certain
       /// node of a graph.
-      typedef GraphIncIt<Graph, Edge, Node, 'u'> IncArcIt;
+      typedef GraphIncIt<Graph, Edge, Node, 'u'> IncEdgeIt;
       /// \brief The base node of the iterator.
       ///
       /// Gives back the base node of the iterator.
-      Node baseNode(const IncArcIt&) const { return INVALID; }
+      Node baseNode(const IncEdgeIt&) const { return INVALID; }
 
       /// \brief The running node of the iterator.
       ///
       /// Gives back the running node of the iterator.
-      Node runningNode(const IncArcIt&) const { return INVALID; }
+      Node runningNode(const IncEdgeIt&) const { return INVALID; }
 
       /// @}
@@ -866,8 +866,8 @@
               typename _Graph::EdgeIt >();
             checkConcept<GraphIncIt<_Graph, typename _Graph::Edge, 
-              typename _Graph::Node, 'u'>, typename _Graph::IncArcIt>();
+              typename _Graph::Node, 'u'>, typename _Graph::IncEdgeIt>();
             
             typename _Graph::Node n;
-            typename _Graph::IncArcIt ueit(INVALID);
+            typename _Graph::IncEdgeIt ueit(INVALID);
             n = graph.baseNode(ueit);
             n = graph.runningNode(ueit);
Index: lemon/concepts/maps.h
===================================================================
--- lemon/concepts/maps.h	(revision 51)
+++ lemon/concepts/maps.h	(revision 94)
@@ -30,5 +30,5 @@
 
   namespace concepts {
-  
+
     /// \addtogroup concept
     /// @{
@@ -43,61 +43,21 @@
     public:
       /// The key type of the map.
-      typedef K Key;    
-      /// The value type of the map. (The type of objects associated with the keys).
-      typedef T Value;
-
-      /// Returns the value associated with a key.
-
-      /// Returns the value associated with a key.
-      /// \bug Value shouldn't need to be default constructible.
-      ///
-      Value operator[](const Key &) const {return Value();}
+      typedef K Key;
+      /// The value type of the map. (The type of objects associated with the keys).
+      typedef T Value;
+
+      /// Returns the value associated with the given key.
+      Value operator[](const Key &) const { 
+        return *static_cast<Value *>(0);
+      }
 
       template<typename _ReadMap>
       struct Constraints {
-
 	void constraints() {
 	  Value val = m[key];
 	  val = m[key];
-	  typename _ReadMap::Value own_val = m[own_key]; 
-	  own_val = m[own_key]; 
-
-	  ignore_unused_variable_warning(val);
-	  ignore_unused_variable_warning(own_val);
-	  ignore_unused_variable_warning(key);
-	}
-	Key& key;
-	typename _ReadMap::Key& own_key;
-	_ReadMap& m;
-      };
-      
-    };
-
-
-    /// Writable map concept
-    
-    /// Writable map concept.
-    ///
-    template<typename K, typename T>
-    class WriteMap
-    {
-    public:
-      /// The key type of the map.
-      typedef K Key;    
-      /// The value type of the map. (The type of objects associated with the keys).
-      typedef T Value;
-
-      /// Sets the value associated with a key.
-      void set(const Key &,const Value &) {}
-
-      ///Default constructor
-      WriteMap() {}
-
-      template <typename _WriteMap>
-      struct Constraints {
-	void constraints() {
-	  // No constraints for constructor.
-	  m.set(key, val);
-	  m.set(own_key, own_val);
+	  typename _ReadMap::Value own_val = m[own_key];
+	  own_val = m[own_key];
+
 	  ignore_unused_variable_warning(key);
 	  ignore_unused_variable_warning(val);
@@ -105,16 +65,52 @@
 	  ignore_unused_variable_warning(own_val);
 	}
-
-	Value& val;
-	typename _WriteMap::Value own_val;
-	Key& key;
-	typename _WriteMap::Key& own_key;
+	const Key& key;
+	const typename _ReadMap::Key& own_key;
+	const _ReadMap& m;
+      };
+
+    };
+
+
+    /// Writable map concept
+
+    /// Writable map concept.
+    ///
+    template<typename K, typename T>
+    class WriteMap
+    {
+    public:
+      /// The key type of the map.
+      typedef K Key;
+      /// The value type of the map. (The type of objects associated with the keys).
+      typedef T Value;
+
+      /// Sets the value associated with the given key.
+      void set(const Key &, const Value &) {}
+
+      /// Default constructor.
+      WriteMap() {}
+
+      template <typename _WriteMap>
+      struct Constraints {
+	void constraints() {
+	  m.set(key, val);
+	  m.set(own_key, own_val);
+
+	  ignore_unused_variable_warning(key);
+	  ignore_unused_variable_warning(val);
+	  ignore_unused_variable_warning(own_key);
+	  ignore_unused_variable_warning(own_val);
+	}
+	const Key& key;
+	const Value& val;
+	const typename _WriteMap::Key& own_key;
+	const typename _WriteMap::Value own_val;
 	_WriteMap& m;
-
       };
     };
 
     /// Read/writable map concept
-    
+
     /// Read/writable map concept.
     ///
@@ -125,12 +121,15 @@
     public:
       /// The key type of the map.
-      typedef K Key;    
-      /// The value type of the map. (The type of objects associated with the keys).
-      typedef T Value;
-
-      /// Returns the value associated with a key.
-      Value operator[](const Key &) const {return Value();}
-      /// Sets the value associated with a key.
-      void set(const Key & ,const Value &) {}
+      typedef K Key;
+      /// The value type of the map. (The type of objects associated with the keys).
+      typedef T Value;
+
+      /// Returns the value associated with the given key.
+      Value operator[](const Key &) const { 
+        return *static_cast<Value *>(0);
+      }
+
+      /// Sets the value associated with the given key.
+      void set(const Key &, const Value &) {}
 
       template<typename _ReadWriteMap>
@@ -142,11 +141,10 @@
       };
     };
-  
-  
+
+
     /// Dereferable map concept
-    
+
     /// Dereferable map concept.
     ///
-    /// \todo Rethink this concept.
     template<typename K, typename T, typename R, typename CR>
     class ReferenceMap : public ReadWriteMap<K,T>
@@ -156,5 +154,5 @@
       typedef True ReferenceMapTag;
       /// The key type of the map.
-      typedef K Key;    
+      typedef K Key;
       /// The value type of the map. (The type of objects associated with the keys).
       typedef T Value;
@@ -164,36 +162,42 @@
       typedef CR ConstReference;
 
-    protected:
-      Value tmp;
-    public:
-
-      ///Returns a reference to the value associated with a key.
-      Reference operator[](const Key &) { return tmp; }
-      ///Returns a const reference to the value associated with a key.
-      ConstReference operator[](const Key &) const { return tmp; }
-      /// Sets the value associated with a key.
+    public:
+
+      /// Returns a reference to the value associated with the given key.
+      Reference operator[](const Key &) { 
+        return *static_cast<Value *>(0);
+      }
+
+      /// Returns a const reference to the value associated with the given key.
+      ConstReference operator[](const Key &) const {
+        return *static_cast<Value *>(0);
+      }
+
+      /// Sets the value associated with the given key.
       void set(const Key &k,const Value &t) { operator[](k)=t; }
 
       template<typename _ReferenceMap>
-      struct ReferenceMapConcept {
-
-	void constraints() {
-	  checkConcept<ReadWriteMap, _ReferenceMap >();
+      struct Constraints {
+	void constraints() {
+	  checkConcept<ReadWriteMap<K, T>, _ReferenceMap >();
+	  ref = m[key];
 	  m[key] = val;
-	  val  = m[key];
 	  m[key] = ref;
-	  ref = m[key];
+	  m[key] = cref;
+	  own_ref = m[own_key];
 	  m[own_key] = own_val;
-	  own_val  = m[own_key];
 	  m[own_key] = own_ref;
-	  own_ref = m[own_key];	  	  
-	}
-
-	typename _ReferenceMap::Key& own_key;
+	  m[own_key] = own_cref;
+	  m[key] = m[own_key];
+	  m[own_key] = m[key];
+	}
+	const Key& key;
+	Value& val;
+	Reference ref;
+	ConstReference cref;
+	const typename _ReferenceMap::Key& own_key;
 	typename _ReferenceMap::Value& own_val;
-	typename _ReferenceMap::Reference& own_ref;
-	Key& key;
-	Value& val;
-	Reference& ref;
+	typename _ReferenceMap::Reference own_ref;
+	typename _ReferenceMap::ConstReference own_cref;
 	_ReferenceMap& m;
       };
