Boost logo

Boost Users :

Subject: Re: [Boost-users] [Graph] call of overloaded 'target(...)' is ambiguous
From: Dmitry Bufistov (dmitry_at_[hidden])
Date: 2008-12-05 06:09:50


Hi Tim,
You might try to use boost::target() instead of target()

Regards,
Dmitry

Tim Keitt wrote:
>
> The ambiguous call to 'target' occurs here:
>
> template <class PredEdgeMap, class Tag>
> struct edge_predecessor_recorder
> : public base_visitor<edge_predecessor_recorder<PredEdgeMap, Tag> >
> {
> typedef Tag event_filter;
> edge_predecessor_recorder(PredEdgeMap pa) : m_predecessor(pa) { }
> template <class Edge, class Graph>
> void operator()(Edge e, const Graph& g) {
> put(m_predecessor, target(e, g), e);
> }
> PredEdgeMap m_predecessor;
> };
>
> Notice that the 'target' template takes one parameter ('G') and the
> 'operator()' template takes two parameters ('Edge' and 'Graph').
> Notice also below the occurrence of both 'G' and 'Graph' in the
> 'candidates are' section.
>
> Might this be fixed as:
>
> template <class Graph>
> void operator()(typename Graph::edge_descriptor e, const Graph& g) {
> put(m_predecessor, target(e, g), e);
> }
>
> double> >, boost::keep_all>&)' is ambiguous
> /usr/include/boost/graph/filtered_graph.hpp:322: note: candidates are:
> typename boost::filtered_graph_base<G>::vertex_descriptor
> boost::target(typename boost::filtered_graph_base<G>::edge_descriptor,

> /usr/include/boost/graph/graph_traits.hpp:154: note: T
> std::target(std::pair<_ForwardIterator, _ForwardIterator>, const G&)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net