3 Jun
2005
3 Jun
'05
9:12 p.m.
On Jun 3, 2005, at 3:10 PM, Todd A. Gibson wrote:
Hello, Take this snippet: // g is an adjacency_list // u,v are vertices bool b; edge_desc e; tie(e,b)=boost::edge(u,v,g); if(b==false) std::cerr << "No such edge!";
boost::edge() is written to handle non-existent vertices: [snip] However, I don't believe out_edge_list handles invalid vertices. If I provide an invalid source vertex, u, I get a segmentation fault on the call to g.out_edge_list(u).find(v).
I don't believe edge() was intended to handle non-existent vertices. It can't be efficiently implemented for most adjacency_list types. Doug