
Jacques Papper wrote:
I'm new to Boost and the graph library and I don't understand why my compiler complains :
error: no matching function for call to `add_edge(int, int, boost::compressed_sparse_row_graph<boost::directedS, void, void, boost::no_property, size_t, size_t>&)'
My code is copied underneath : I'm trying to simply create a CSR graph and add an edge ... from the CSR header I see that add_edge is an inline function (same as add_vertex etc...)... Why does this not work ?
It's a template argument deduction failure, because you are passing "int" values where it is expecting "size_t" values... I believe we have fixed this in Boost's Subversion repository, but to work around the problem please use, e.g., add_edge(std::size_t(3), std::size_t(4), csr); - Doug