I want to check if a vertex_descriptor is valid before using it. As I saw on
this list, I perform the following test :
Graph_t graph(10);
vertexDescriptor srcVertex = boost::vertex(424242, graph);
if (Graph_t::null_vertex() == boost::vertex(424242, graph))
{
return;
}
Obviously, vertex indice 424242 does not exist, but test fails, and function
does not return, leading the a crash of the following algorithm (BFS or
Dijkstra).
What did I do wrong?
Thanks for your help.
--
Florian PONROY
Thales Land & Joint France
Tel. : +33(0)1 41 304 363
Fax : +33(0)1 41 303 560
Email : florian...@fr.thalesgroup.com
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi,I want to check if a vertex_descriptor is valid before using it. As I saw onthis list, I perform the following test :Graph_t graph(10);vertexDescriptor srcVertex = boost::vertex(424242, graph);if (Graph_t::null_vertex() == boost::vertex(424242, graph)){return;}Obviously, vertex indice 424242 does not exist, but test fails, and functiondoes not return, leading the a crash of the following algorithm (BFS orDijkstra).What did I do wrong?Thanks for your help.
Obviously, vertex indice 424242 does not exist, but test fails, and function
does not return, leading the a crash of the following algorithm (BFS or
Dijkstra).
What did I do wrong?
Thanks for your help.