
David A. Greene wrote:
[Apologies if this has been asked before. Gmane is down and Google didn't return anything interesting.]
I have a Boost (1.34.1) Graph declared like this:
typedef boost::adjacency_list<boost::setS, // Out edge list type boost::listS, // Vertex list type boost::undirectedS, vertex_property_bundle // Vertex properties // Edge properties > my_graph_type;
I want to find out if an edge is in the graph:
typedef typename boost::graph_traits<my_graph_type>:: edge_descriptor_type edge;
edge e; bool present; boost::tie(e, present) = edge(v1, v2, my_graph); ^^^^
I think you want to use boost::edge() here, rather than creating an edge_descriptor. -- Daniel Wallin Boost Consulting www.boost-consulting.com