Index: lemon/core.h
===================================================================
--- lemon/core.h	(revision 1078)
+++ lemon/core.h	(revision 1081)
@@ -27,4 +27,14 @@
 #include <lemon/bits/traits.h>
 #include <lemon/assert.h>
+
+// Disable the following warnings when compiling with MSVC:
+// C4250: 'class1' : inherits 'class2::member' via dominance
+// C4355: 'this' : used in base member initializer list
+// C4503: 'function' : decorated name length exceeded, name was truncated
+// C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
+// C4996: 'function': was declared deprecated
+#ifdef _MSC_VER
+#pragma warning( disable : 4250 4355 4503 4800 4996 )
+#endif
 
 ///\file
@@ -1037,13 +1047,12 @@
   ///\sa findArc()
   ///\sa ArcLookUp, AllArcLookUp, DynArcLookUp
-  template <typename _Graph>
-  class ConArcIt : public _Graph::Arc {
+  template <typename GR>
+  class ConArcIt : public GR::Arc {
+    typedef typename GR::Arc Parent;
+
   public:
 
-    typedef _Graph Graph;
-    typedef typename Graph::Arc Parent;
-
-    typedef typename Graph::Arc Arc;
-    typedef typename Graph::Node Node;
+    typedef typename GR::Arc Arc;
+    typedef typename GR::Node Node;
 
     /// \brief Constructor.
@@ -1051,5 +1060,5 @@
     /// Construct a new ConArcIt iterating on the arcs that
     /// connects nodes \c u and \c v.
-    ConArcIt(const Graph& g, Node u, Node v) : _graph(g) {
+    ConArcIt(const GR& g, Node u, Node v) : _graph(g) {
       Parent::operator=(findArc(_graph, u, v));
     }
@@ -1058,5 +1067,5 @@
     ///
     /// Construct a new ConArcIt that continues the iterating from arc \c a.
-    ConArcIt(const Graph& g, Arc a) : Parent(a), _graph(g) {}
+    ConArcIt(const GR& g, Arc a) : Parent(a), _graph(g) {}
 
     /// \brief Increment operator.
@@ -1069,5 +1078,5 @@
     }
   private:
-    const Graph& _graph;
+    const GR& _graph;
   };
 
@@ -1160,13 +1169,12 @@
   ///
   ///\sa findEdge()
-  template <typename _Graph>
-  class ConEdgeIt : public _Graph::Edge {
+  template <typename GR>
+  class ConEdgeIt : public GR::Edge {
+    typedef typename GR::Edge Parent;
+
   public:
 
-    typedef _Graph Graph;
-    typedef typename Graph::Edge Parent;
-
-    typedef typename Graph::Edge Edge;
-    typedef typename Graph::Node Node;
+    typedef typename GR::Edge Edge;
+    typedef typename GR::Node Node;
 
     /// \brief Constructor.
@@ -1174,5 +1182,5 @@
     /// Construct a new ConEdgeIt iterating on the edges that
     /// connects nodes \c u and \c v.
-    ConEdgeIt(const Graph& g, Node u, Node v) : _graph(g), _u(u), _v(v) {
+    ConEdgeIt(const GR& g, Node u, Node v) : _graph(g), _u(u), _v(v) {
       Parent::operator=(findEdge(_graph, _u, _v));
     }
@@ -1181,5 +1189,5 @@
     ///
     /// Construct a new ConEdgeIt that continues iterating from edge \c e.
-    ConEdgeIt(const Graph& g, Edge e) : Parent(e), _graph(g) {}
+    ConEdgeIt(const GR& g, Edge e) : Parent(e), _graph(g) {}
 
     /// \brief Increment operator.
@@ -1191,5 +1199,5 @@
     }
   private:
-    const Graph& _graph;
+    const GR& _graph;
     Node _u, _v;
   };
@@ -1214,27 +1222,31 @@
   ///queries.
   ///
-  ///\tparam G The type of the underlying digraph.
+  ///\tparam GR The type of the underlying digraph.
   ///
   ///\sa ArcLookUp
   ///\sa AllArcLookUp
-  template<class G>
+  template <typename GR>
   class DynArcLookUp
-    : protected ItemSetTraits<G, typename G::Arc>::ItemNotifier::ObserverBase
+    : protected ItemSetTraits<GR, typename GR::Arc>::ItemNotifier::ObserverBase
   {
+    typedef typename ItemSetTraits<GR, typename GR::Arc>
+    ::ItemNotifier::ObserverBase Parent;
+
+    TEMPLATE_DIGRAPH_TYPEDEFS(GR);
+
   public:
-    typedef typename ItemSetTraits<G, typename G::Arc>
-    ::ItemNotifier::ObserverBase Parent;
-
-    TEMPLATE_DIGRAPH_TYPEDEFS(G);
-    typedef G Digraph;
+
+    /// The Digraph type
+    typedef GR Digraph;
 
   protected:
 
-    class AutoNodeMap : public ItemSetTraits<G, Node>::template Map<Arc>::Type {
+    class AutoNodeMap :
+      public ItemSetTraits<GR, Node>::template Map<Arc>::Type {
+      typedef typename ItemSetTraits<GR, Node>::template Map<Arc>::Type Parent;
+
     public:
 
-      typedef typename ItemSetTraits<G, Node>::template Map<Arc>::Type Parent;
-
-      AutoNodeMap(const G& digraph) : Parent(digraph, INVALID) {}
+      AutoNodeMap(const GR& digraph) : Parent(digraph, INVALID) {}
 
       virtual void add(const Node& node) {
@@ -1259,10 +1271,4 @@
       }
     };
-
-    const Digraph &_g;
-    AutoNodeMap _head;
-    typename Digraph::template ArcMap<Arc> _parent;
-    typename Digraph::template ArcMap<Arc> _left;
-    typename Digraph::template ArcMap<Arc> _right;
 
     class ArcLess {
@@ -1276,4 +1282,12 @@
     };
 
+  protected:
+
+    const Digraph &_g;
+    AutoNodeMap _head;
+    typename Digraph::template ArcMap<Arc> _parent;
+    typename Digraph::template ArcMap<Arc> _left;
+    typename Digraph::template ArcMap<Arc> _right;
+
   public:
 
@@ -1318,5 +1332,5 @@
     virtual void clear() {
       for(NodeIt n(_g);n!=INVALID;++n) {
-        _head.set(n, INVALID);
+        _head[n] = INVALID;
       }
     }
@@ -1325,11 +1339,11 @@
       Node s = _g.source(arc);
       Node t = _g.target(arc);
-      _left.set(arc, INVALID);
-      _right.set(arc, INVALID);
+      _left[arc] = INVALID;
+      _right[arc] = INVALID;
 
       Arc e = _head[s];
       if (e == INVALID) {
-        _head.set(s, arc);
-        _parent.set(arc, INVALID);
+        _head[s] = arc;
+        _parent[arc] = INVALID;
         return;
       }
@@ -1337,6 +1351,6 @@
         if (t < _g.target(e)) {
           if (_left[e] == INVALID) {
-            _left.set(e, arc);
-            _parent.set(arc, e);
+            _left[e] = arc;
+            _parent[arc] = e;
             splay(arc);
             return;
@@ -1346,6 +1360,6 @@
         } else {
           if (_right[e] == INVALID) {
-            _right.set(e, arc);
-            _parent.set(arc, e);
+            _right[e] = arc;
+            _parent[arc] = e;
             splay(arc);
             return;
@@ -1360,25 +1374,25 @@
       if (_left[arc] == INVALID) {
         if (_right[arc] != INVALID) {
-          _parent.set(_right[arc], _parent[arc]);
+          _parent[_right[arc]] = _parent[arc];
         }
         if (_parent[arc] != INVALID) {
           if (_left[_parent[arc]] == arc) {
-            _left.set(_parent[arc], _right[arc]);
+            _left[_parent[arc]] = _right[arc];
           } else {
-            _right.set(_parent[arc], _right[arc]);
+            _right[_parent[arc]] = _right[arc];
           }
         } else {
-          _head.set(_g.source(arc), _right[arc]);
+          _head[_g.source(arc)] = _right[arc];
         }
       } else if (_right[arc] == INVALID) {
-        _parent.set(_left[arc], _parent[arc]);
+        _parent[_left[arc]] = _parent[arc];
         if (_parent[arc] != INVALID) {
           if (_left[_parent[arc]] == arc) {
-            _left.set(_parent[arc], _left[arc]);
+            _left[_parent[arc]] = _left[arc];
           } else {
-            _right.set(_parent[arc], _left[arc]);
+            _right[_parent[arc]] = _left[arc];
           }
         } else {
-          _head.set(_g.source(arc), _left[arc]);
+          _head[_g.source(arc)] = _left[arc];
         }
       } else {
@@ -1390,36 +1404,36 @@
           }
           Arc s = _parent[e];
-          _right.set(_parent[e], _left[e]);
+          _right[_parent[e]] = _left[e];
           if (_left[e] != INVALID) {
-            _parent.set(_left[e], _parent[e]);
+            _parent[_left[e]] = _parent[e];
           }
 
-          _left.set(e, _left[arc]);
-          _parent.set(_left[arc], e);
-          _right.set(e, _right[arc]);
-          _parent.set(_right[arc], e);
-
-          _parent.set(e, _parent[arc]);
+          _left[e] = _left[arc];
+          _parent[_left[arc]] = e;
+          _right[e] = _right[arc];
+          _parent[_right[arc]] = e;
+
+          _parent[e] = _parent[arc];
           if (_parent[arc] != INVALID) {
             if (_left[_parent[arc]] == arc) {
-              _left.set(_parent[arc], e);
+              _left[_parent[arc]] = e;
             } else {
-              _right.set(_parent[arc], e);
+              _right[_parent[arc]] = e;
             }
           }
           splay(s);
         } else {
-          _right.set(e, _right[arc]);
-          _parent.set(_right[arc], e);
-          _parent.set(e, _parent[arc]);
+          _right[e] = _right[arc];
+          _parent[_right[arc]] = e;
+          _parent[e] = _parent[arc];
 
           if (_parent[arc] != INVALID) {
             if (_left[_parent[arc]] == arc) {
-              _left.set(_parent[arc], e);
+              _left[_parent[arc]] = e;
             } else {
-              _right.set(_parent[arc], e);
+              _right[_parent[arc]] = e;
             }
           } else {
-            _head.set(_g.source(arc), e);
+            _head[_g.source(arc)] = e;
           }
         }
@@ -1433,15 +1447,15 @@
       if (a < m) {
         Arc left = refreshRec(v,a,m-1);
-        _left.set(me, left);
-        _parent.set(left, me);
+        _left[me] = left;
+        _parent[left] = me;
       } else {
-        _left.set(me, INVALID);
+        _left[me] = INVALID;
       }
       if (m < b) {
         Arc right = refreshRec(v,m+1,b);
-        _right.set(me, right);
-        _parent.set(right, me);
+        _right[me] = right;
+        _parent[right] = me;
       } else {
-        _right.set(me, INVALID);
+        _right[me] = INVALID;
       }
       return me;
@@ -1455,8 +1469,8 @@
           std::sort(v.begin(),v.end(),ArcLess(_g));
           Arc head = refreshRec(v,0,v.size()-1);
-          _head.set(n, head);
-          _parent.set(head, INVALID);
-        }
-        else _head.set(n, INVALID);
+          _head[n] = head;
+          _parent[head] = INVALID;
+        }
+        else _head[n] = INVALID;
       }
     }
@@ -1464,17 +1478,17 @@
     void zig(Arc v) {
       Arc w = _parent[v];
-      _parent.set(v, _parent[w]);
-      _parent.set(w, v);
-      _left.set(w, _right[v]);
-      _right.set(v, w);
+      _parent[v] = _parent[w];
+      _parent[w] = v;
+      _left[w] = _right[v];
+      _right[v] = w;
       if (_parent[v] != INVALID) {
         if (_right[_parent[v]] == w) {
-          _right.set(_parent[v], v);
+          _right[_parent[v]] = v;
         } else {
-          _left.set(_parent[v], v);
+          _left[_parent[v]] = v;
         }
       }
       if (_left[w] != INVALID){
-        _parent.set(_left[w], w);
+        _parent[_left[w]] = w;
       }
     }
@@ -1482,17 +1496,17 @@
     void zag(Arc v) {
       Arc w = _parent[v];
-      _parent.set(v, _parent[w]);
-      _parent.set(w, v);
-      _right.set(w, _left[v]);
-      _left.set(v, w);
+      _parent[v] = _parent[w];
+      _parent[w] = v;
+      _right[w] = _left[v];
+      _left[v] = w;
       if (_parent[v] != INVALID){
         if (_left[_parent[v]] == w) {
-          _left.set(_parent[v], v);
+          _left[_parent[v]] = v;
         } else {
-          _right.set(_parent[v], v);
+          _right[_parent[v]] = v;
         }
       }
       if (_right[w] != INVALID){
-        _parent.set(_right[w], w);
+        _parent[_right[w]] = w;
       }
     }
@@ -1626,14 +1640,17 @@
   ///(<em>O</em>(<em>m</em> log<em>m</em>)) to the number of arcs).
   ///
-  ///\tparam G The type of the underlying digraph.
+  ///\tparam GR The type of the underlying digraph.
   ///
   ///\sa DynArcLookUp
   ///\sa AllArcLookUp
-  template<class G>
+  template<class GR>
   class ArcLookUp
   {
+    TEMPLATE_DIGRAPH_TYPEDEFS(GR);
+
   public:
-    TEMPLATE_DIGRAPH_TYPEDEFS(G);
-    typedef G Digraph;
+
+    /// The Digraph type
+    typedef GR Digraph;
 
   protected:
@@ -1736,20 +1753,19 @@
   ///(<em>O</em>(<em>m</em> log<em>m</em>)) to the number of arcs).
   ///
-  ///\tparam G The type of the underlying digraph.
+  ///\tparam GR The type of the underlying digraph.
   ///
   ///\sa DynArcLookUp
   ///\sa ArcLookUp
-  template<class G>
-  class AllArcLookUp : public ArcLookUp<G>
+  template<class GR>
+  class AllArcLookUp : public ArcLookUp<GR>
   {
-    using ArcLookUp<G>::_g;
-    using ArcLookUp<G>::_right;
-    using ArcLookUp<G>::_left;
-    using ArcLookUp<G>::_head;
-
-    TEMPLATE_DIGRAPH_TYPEDEFS(G);
-    typedef G Digraph;
-
-    typename Digraph::template ArcMap<Arc> _next;
+    using ArcLookUp<GR>::_g;
+    using ArcLookUp<GR>::_right;
+    using ArcLookUp<GR>::_left;
+    using ArcLookUp<GR>::_head;
+
+    TEMPLATE_DIGRAPH_TYPEDEFS(GR);
+
+    typename GR::template ArcMap<Arc> _next;
 
     Arc refreshNext(Arc head,Arc next=INVALID)
@@ -1770,4 +1786,8 @@
 
   public:
+
+    /// The Digraph type
+    typedef GR Digraph;
+
     ///Constructor
 
@@ -1776,5 +1796,5 @@
     ///It builds up the search database, which remains valid until the digraph
     ///changes.
-    AllArcLookUp(const Digraph &g) : ArcLookUp<G>(g), _next(g) {refreshNext();}
+    AllArcLookUp(const Digraph &g) : ArcLookUp<GR>(g), _next(g) {refreshNext();}
 
     ///Refresh the data structure at a node.
@@ -1786,5 +1806,5 @@
     void refresh(Node n)
     {
-      ArcLookUp<G>::refresh(n);
+      ArcLookUp<GR>::refresh(n);
       refreshNext(_head[n]);
     }
@@ -1833,5 +1853,5 @@
     Arc operator()(Node s, Node t, Arc prev=INVALID) const {}
 #else
-    using ArcLookUp<G>::operator() ;
+    using ArcLookUp<GR>::operator() ;
     Arc operator()(Node s, Node t, Arc prev) const
     {
