/usr/include/boost/graph/edmunds_karp_max_flow.hpp:232:   instantiated
from 'typename boost::detail::edge_capacity_value<Graph, P, T,
R>::type boost::edmunds_karp_max_flow(Graph&, typename
boost::graph_traits<G>::vertex_descriptor, typename
boost::graph_traits<G>::vertex_descriptor, const
boost::bgl_named_params<P, T, R>&) [with Graph =
FlowCapacitySQLDiGraph, P =
edge_index_property_map<FlowCapacitySQLDiGraph, double>, T =
boost::edge_residual_capacity_t, R = boost::no_property]'
postgraph.cpp:1092:   instantiated from here
/usr/include/boost/graph/visitors.hpp:176: error: call of overloaded
'target(FlowCapacitySQLDiGraph::edge_descriptor&, const
boost::filtered_graph<FlowCapacitySQLDiGraph,
boost::is_residual_edge<edge_index_property_map<FlowCapacitySQLDiGraph,
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,
const boost::filtered_graph_base<Graph>&) [with G =
FlowCapacitySQLDiGraph]
/usr/include/boost/graph/graph_traits.hpp:154: note:                 T
std::target(std::pair<_ForwardIterator, _ForwardIterator>, const G&)
[with T = unsigned int, G =
boost::filtered_graph<FlowCapacitySQLDiGraph,
boost::is_residual_edge<edge_index_property_map<FlowCapacitySQLDiGraph,
double> >, boost::keep_all>]
make: *** [postgraph.o] Error 1


I'm not sure what version of GCC you're using  - I assume it's GCC - but you're ambiguity is coming from the fact that you probably have "using namespace std" somewhere above this point in your code. The file boost/graph/graph_traits.hpp puts a source() and target() function into the standard namespace to provide an overload for a pair of vertex descriptors, which is apparently need for some kinds of edge descriptor.

Using graph_traits<G>::edge_descriptor as the parameter type might work. Explicitly calling boost::traget() will also probably work.
 
Andrew Sutton
andrew.n.sutton@gmail.com