
24 Jul
2006
24 Jul
'06
1:57 p.m.
Hello, There is a bug in the boost graph library in depth_first_search. When we look at the implementation, we can see in file boost/graph/depth_first_search.hpp): detail::dfs_dispatch<C>::apply (g, choose_param(get_param(params, graph_visitor), make_dfs_visitor(null_visitor())), choose_param(get_param(params, root_vertex_t()), *vertices(g).first), params, get_param(params, vertex_color) ); This code makes the assumption the the graph is non-empty, since it calls *vertices(g).first. For empty graphs, this call fails. Best regards, -- Loïc