
17 Aug
2007
17 Aug
'07
2:28 p.m.
Sourabh wrote:
I am using the boost graph (adjacency_list) and want to perform BFS on that. I am constructing the graph, passing VertexProperty as a structure (bundled_properties). When I try to modify the structure in my own bfs visitior (in the overriden function discover_vertex), the compiler says the structure (representing the vertex property) is readonly. I had to switch to const_cast of that structure, but it is not elegant.
Can anyone help me through this?
Unfortunately, I don't know of any approach better than the const_cast. - Doug