# HG changeset patch
# User "Balazs Dezso <deba@inf.elte.hu>"
# Date 1208453599 -7200
# Node ID b82dc494bafca1859c5f73bc1f9556390bdd08e1
# Parent  6e7aee618f037c144a58dce8fb91cffbfa9ff11f
Icc compatibility fixes (ticket #84)

diff -r 6e7aee618f03 -r b82dc494bafc lemon/kruskal.h
--- a/lemon/kruskal.h	Thu Apr 17 15:54:30 2008 +0100
+++ b/lemon/kruskal.h	Thu Apr 17 19:33:19 2008 +0200
@@ -212,6 +212,16 @@
       }
     };
 
+    template <typename T>
+    struct RemoveConst {
+      typedef T type;
+    };
+
+    template <typename T>
+    struct RemoveConst<const T> {
+      typedef T type;
+    };
+
     template <typename Graph, typename In, typename Out>
     struct KruskalOutputSelector<Graph, In, Out,
       typename enable_if<SequenceOutputIndicator<Out>, void>::type > 
@@ -219,7 +229,7 @@
       typedef typename In::value_type::second_type Value;
 
       static Value kruskal(const Graph& graph, const In& in, Out& out) {
-        typedef StoreBoolMap<Out> Map;
+        typedef StoreBoolMap<typename RemoveConst<Out>::type> Map;
         Map map(out);
         return _kruskal_bits::kruskal(graph, in, map);
       }
diff -r 6e7aee618f03 -r b82dc494bafc test/maps_test.cc
--- a/test/maps_test.cc	Thu Apr 17 15:54:30 2008 +0100
+++ b/test/maps_test.cc	Thu Apr 17 19:33:19 2008 +0200
@@ -85,7 +85,7 @@
     checkConcept<ReadWriteMap<A,B>, ConstMap<A,B> >();
     checkConcept<ReadWriteMap<A,C>, ConstMap<A,C> >();
     ConstMap<A,B> map1;
-    ConstMap<A,B> map2(B());
+    ConstMap<A,B> map2 = B();
     ConstMap<A,B> map3 = map1;
     map1 = constMap<A>(B());
     map1 = constMap<A,B>();
@@ -143,7 +143,7 @@
   {
     checkConcept<ReferenceMap<A,B,B&,const B&>, SparseMap<A,B> >();
     SparseMap<A,B> map1;
-    SparseMap<A,B> map2(B());
+    SparseMap<A,B> map2 = B();
     SparseMap<A,B> map3 = sparseMap<A,B>();
     SparseMap<A,B> map4 = sparseMap<A>(B());