
Folks, I've encountered a problem whilst compiling the following program, and I can't quite figure out why it shouldn't work. Whilst compiling usign boost 1.32.0 and gcc 3.3.4, I get cannot convert `boost::detail::edge_desc_impl<boost::bidirectional_tag, size_t>' to `int' for argument `2' to `const T& get(const T*, int) [with T = int]' I believe this is saying that edge descriptors cannot be used as indices into a property map (that is, "wm"). Why is this different from vertex descriptors, which are accepted as indices into "p" and "dist"? Any help appreciated. Thanks, Andrea #include <boost/graph/graph_traits.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/bellman_ford_shortest_paths.hpp> int main () { typedef boost::adjacency_list < boost::vecS, boost::vecS, boost::bidirectionalS > Graph; Graph G; std::vector < int > wm; std::vector < boost::graph_traits < Graph >::vertex_descriptor > p; std::vector < int > dist; boost::bellman_ford_shortest_paths (G, boost::num_vertices(G), &wm[0], &p[0], &dist[0], boost::closed_plus < int >(), std::less < int >(), boost::default_bellman_visitor ()); return 0; }