Re: [Boost-users] [Graph] edge() not working
Hi I am not sure I understand your program. But I know I do the same thing to check for existence of edges however I use edge_descriptor (and I work on a directed graph) instead edge_descriptor_type: typedef typename boost::graph_traits<my_graph_type>::edge_descriptor_type edge; I did not know that there was anything called an edge_descriptor_type ?? Does this help?? g++ often give strange error messages. Best regards Line R. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of David A. Greene Sent: 31. august 2007 02:48 To: boost-users@lists.boost.org Subject: [Boost-users] [Graph] edge() not working [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); Unfortunately, g++ 4.1.2 doesn't like it: error: no matching function for call to boost::detail::edge_desc_impl<boost::undirected_tag, void*>::edge_desc_impl(void* const&, void* const&, boost::adjacency_list<boost::setS, boost::listS, boost::undirectedS, vertex_property_bundle, boost::no_property, boost::no_property, boost::listS>&) boost-1_34_1/boost/graph/detail/edge.hpp:43: note: candidates are: boost::detail::edge_desc_impl<Directed, Vertex>::edge_desc_impl(Vertex, Vertex, const void*) [with Directed = boost::undirected_tag, Vertex = void*] boost-1_34_1/boost/graph/detail/edge.hpp:41: note: boost::detail::edge_desc_impl<Directed, Vertex>::edge_desc_impl() [with Directed = boost::undirected_tag, Vertex = void*] boost/graph/detail/edge.hpp:35: note: boost::detail::edge_desc_impl<boost::undirected_tag, void*>::edge_desc_impl(const boost::detail::edge_desc_impl<boost::undirected_tag, void*>&) Has anyone else run into this problem before? How does a reference to the graph get passed to edge_desc_impl's constructor? Thanks. -Dave _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Friday 31 August 2007 07:14, Line B. Reinhardt wrote:
typedef typename boost::graph_traits<my_graph_type>::edge_descriptor_type edge;
I did not know that there was anything called an edge_descriptor_type ??
Oops, it was a typo on my part. Cut-n-paste isn't working ATM so I had to improvise. I do use edge_descriptor. I'm building gcc 4.2.1 at the moment to see if that helps. -Dave
participants (2)
-
David A. Greene
-
Line B. Reinhardt