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 }