On Aug 15, 2005, at 3:58 PM, Tiago de Paula Peixoto wrote:
I have one more problem with filtered_graph, but this time it has to do with bundled properties. If I try to compile the following program:
-------------------------------------------------------------- #include
#include using namespace boost;
struct VertexProperties { int answer; };
int main() { typedef adjacency_list
graph_t; typedef filtered_graph f_graph_t; graph_t g; f_graph_t fg(g, keep_all()); graph_traits ::vertex_descriptor v = add_vertex(g); fg[v].answer = 42; return 0; } -------------------------------------------------------------- I get the following error with boost 1.33 and GCC 4.0.1: [snip] This was supposed to work right? The error is pretty clear, but I don't know what "local_to_global" is supposed to do, and where it should be.
Yes, it should have worked.
I made the attached modifications to a local version of filtered_graph.hpp, and the code above compiles, but I don't think that they are right at all, since I changed the constness of the internal reference to the original graph.
I think we're better off using const_cast instead of changing the stored reference. I've fixed the problem in CVS and the fix will be part of the upcoming 1.33.1 release. Thanks for reporting the bug! Doug