Rogier van de Roer
2006-01-17
When I try to compile the dijkstra_shortest_paths example using Borland C++ Builder 6.0 (Personal update 4) and boost_1_33_1. I get the following error:
In fact this happens when I try to compile any of the shortest paths examples (even with older boost libraries).
"dijkstra_shortest_paths.hpp": E2285 Could not find a match for
'dijkstra_shortest_paths<VertexListGraph,Param,Tag,Rest>(const
adjacency_list<vecS,vecS,directedS,no_property,property<edge_weight_t,int,no
_property>,no_property,listS>,unsigned int,unsigned int *
const,iterator_property_map<int
*,vec_adj_list_vertex_id_map<no_property,unsigned int>,int,int
&>,adj_list_edge_property_map<directed_tag,int,const int &,unsigned
int,const
property<edge_weight_t,int,no_property>,edge_weight_t>,vec_adj_list_vertex_i
d_map<no_property,unsigned int>,undefined,const
closed_plus<int>,undefined,undefined,const default_dijkstra_visitor)' in
function void
dijkstra_dispatch2<adjacency_list<vecS,vecS,directedS,no_property,property<e
dge_weight_t,int,no_property>,no_property,listS>,const
iterator_property_map<int *,vec_adj_list_vertex_id_map<no_property,unsigned
int>,int,int &>,adj_list_edge_property_map<directed_tag,int,const int
&,unsigned int,const
property<edge_weight_t,int,no_property>,edge_weight_t>,vec_adj_list_vertex_i
d_map<no_property,unsigned int>,bgl_named_params<unsigned int
*,vertex_predecessor_t,no_property> >(const
adjacency_list<vecS,vecS,directedS,no_property,property<edge_weight_t,int,no
_property>,no_property,listS> &,unsigned int,iterator_property_map<int
*,vec_adj_list_vertex_id_map<no_property,unsigned int>,int,int
&>,adj_list_edge_property_map<directed_tag,int,const int &,unsigned
int,const
property<edge_weight_t,int,no_property>,edge_weight_t>,vec_adj_list_vertex_i
d_map<no_property,unsigned int>,const bgl_named_params<unsigned int
*,vertex_predecessor_t,no_property> &) at line 247
I hope anyone can help? Regards Rogier
matt-
2006-01-18
this is because of the named_parameter templating. I also had to change this for MS VC++ 2003. Change the call by explicitly specifying all the parameters to something like :
dijkstra_shortest_paths(myGraph, s, &p[0], &d[0],weightmap, indexMap,std::less<int>(), closed_plus<int>(),(std::numeric_limits<int>::max)(), 0, default_dijkstra_visitor());