I have
struct edge_properties
{
Traits::edge_descriptor ePredecessor;
}
some_function ( const Graph g )
{
e = edge(vertex_a, vertex_b, g).first;
//fails here
g[e].ePredecessor = e;
}
compiler gives
./Includes/Utilities.cpp:451: error: passing ‘const boost::detail::edge_desc_impl<boost::bidirectional_tag, long unsigned int>’ as ‘this’ argument of ‘boost::detail::edge_desc_impl<boost::bidirectional_tag, long unsigned int>&
boost::detail::edge_desc_impl<boost::bidirectional_tag, long unsigned int>::operator=(const boost::detail::edge_desc_impl<boost::bidirectional_tag, long unsigned int>&)’ discards qualifiers
make: *** [pl] Error 1
My guess is that e is returned as a const but g[e].ePredecessor is declared a variable.
How can I fix this?
Thanks
John