Icc compatibility fixes (ticket #84)
author"Balazs Dezso <deba@inf.elte.hu>"
Thu, 17 Apr 2008 19:33:19 +0200
changeset 136b82dc494bafc
parent 135 6e7aee618f03
child 137 483bc6ed7292
Icc compatibility fixes (ticket #84)
lemon/kruskal.h
test/maps_test.cc
     1.1 --- a/lemon/kruskal.h	Thu Apr 17 15:54:30 2008 +0100
     1.2 +++ b/lemon/kruskal.h	Thu Apr 17 19:33:19 2008 +0200
     1.3 @@ -212,6 +212,16 @@
     1.4        }
     1.5      };
     1.6  
     1.7 +    template <typename T>
     1.8 +    struct RemoveConst {
     1.9 +      typedef T type;
    1.10 +    };
    1.11 +
    1.12 +    template <typename T>
    1.13 +    struct RemoveConst<const T> {
    1.14 +      typedef T type;
    1.15 +    };
    1.16 +
    1.17      template <typename Graph, typename In, typename Out>
    1.18      struct KruskalOutputSelector<Graph, In, Out,
    1.19        typename enable_if<SequenceOutputIndicator<Out>, void>::type > 
    1.20 @@ -219,7 +229,7 @@
    1.21        typedef typename In::value_type::second_type Value;
    1.22  
    1.23        static Value kruskal(const Graph& graph, const In& in, Out& out) {
    1.24 -        typedef StoreBoolMap<Out> Map;
    1.25 +        typedef StoreBoolMap<typename RemoveConst<Out>::type> Map;
    1.26          Map map(out);
    1.27          return _kruskal_bits::kruskal(graph, in, map);
    1.28        }
     2.1 --- a/test/maps_test.cc	Thu Apr 17 15:54:30 2008 +0100
     2.2 +++ b/test/maps_test.cc	Thu Apr 17 19:33:19 2008 +0200
     2.3 @@ -85,7 +85,7 @@
     2.4      checkConcept<ReadWriteMap<A,B>, ConstMap<A,B> >();
     2.5      checkConcept<ReadWriteMap<A,C>, ConstMap<A,C> >();
     2.6      ConstMap<A,B> map1;
     2.7 -    ConstMap<A,B> map2(B());
     2.8 +    ConstMap<A,B> map2 = B();
     2.9      ConstMap<A,B> map3 = map1;
    2.10      map1 = constMap<A>(B());
    2.11      map1 = constMap<A,B>();
    2.12 @@ -143,7 +143,7 @@
    2.13    {
    2.14      checkConcept<ReferenceMap<A,B,B&,const B&>, SparseMap<A,B> >();
    2.15      SparseMap<A,B> map1;
    2.16 -    SparseMap<A,B> map2(B());
    2.17 +    SparseMap<A,B> map2 = B();
    2.18      SparseMap<A,B> map3 = sparseMap<A,B>();
    2.19      SparseMap<A,B> map4 = sparseMap<A>(B());
    2.20