Changeset 136:b82dc494bafc in lemon1.0
 Timestamp:
 04/17/08 19:33:19 (13 years ago)
 Branch:
 default
 Phase:
 public
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

lemon/kruskal.h
r103 r136 213 213 }; 214 214 215 template <typename T> 216 struct RemoveConst { 217 typedef T type; 218 }; 219 220 template <typename T> 221 struct RemoveConst<const T> { 222 typedef T type; 223 }; 224 215 225 template <typename Graph, typename In, typename Out> 216 226 struct KruskalOutputSelector<Graph, In, Out, … … 220 230 221 231 static Value kruskal(const Graph& graph, const In& in, Out& out) { 222 typedef StoreBoolMap< Out> Map;232 typedef StoreBoolMap<typename RemoveConst<Out>::type> Map; 223 233 Map map(out); 224 234 return _kruskal_bits::kruskal(graph, in, map); 
test/maps_test.cc
r123 r136 86 86 checkConcept<ReadWriteMap<A,C>, ConstMap<A,C> >(); 87 87 ConstMap<A,B> map1; 88 ConstMap<A,B> map2 (B());88 ConstMap<A,B> map2 = B(); 89 89 ConstMap<A,B> map3 = map1; 90 90 map1 = constMap<A>(B()); … … 144 144 checkConcept<ReferenceMap<A,B,B&,const B&>, SparseMap<A,B> >(); 145 145 SparseMap<A,B> map1; 146 SparseMap<A,B> map2 (B());146 SparseMap<A,B> map2 = B(); 147 147 SparseMap<A,B> map3 = sparseMap<A,B>(); 148 148 SparseMap<A,B> map4 = sparseMap<A>(B());
Note: See TracChangeset
for help on using the changeset viewer.