Boost logo

Boost Users :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2005-06-03 16:12:42

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:
> 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.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at