i got a segmentation fault with the code below on some graphs. What could be the reason? It is ensured that the if-clause is true at least for one vertex. I use vecS for both, the vertex set and the edge set.
Thanks!
void f(&G)
{
...vertex_iterator vIt, vEnd;
...vertex_desc v
for(boost::tie(vIt, vEnd) = boost::vertices(G); vIt != vEnd; vIt++){
...computation...
if(...)
v = *vIt
}
set S
adjacency_iterator nIt, nEnd;
for(boost::tie(nIt, nEnd) = boost::adjacent_vertices(v, G); nIt != nEnd; nIt++){
S.insert(*nIt)
...
}