[BGL] Strange result with internal graph properties
I have the following code in one of my header files:
struct vertex_type_t {
typedef boost::vertex_property_tag kind;
};
enum vtype { ROOT, INNER, LEAF };
typedef boost::property
yg-boost-users@m.gmane.org writes: <my example snipped>
Notice the error: The vertex properties are not chained together. Rather, the actual vertex property that is added to the graph points to vertex_type, and the vertex_index /also/ points to the vertex_type!
Now the strange thing: I have been running this and using all of the vertex properties, including vertex_index, without any problems, but when I noticed this, and tried setting the last template parameter of vertex_property to vertex_index instead I get segmentation faults. I have no idea why this is.
It seems like it was a compiler bug. I had originally been compiling it with g++ version 3.2. Today I tried it using g++ version 3.2.2, and it is working again. I'm not following the g++ development closely enough to know exactly what fixed this. The only mystery that remains is why the erroneous code was working to begin with. How could I be using the vertex index property eg. as an offset map to external property maps when it was not even properly defined as an internal property? Regarding my error, I'm beginning to miss having some kind of compile time debugger for debugging all this template stuff, although I have a feeling it wouldn't have helped me this time. Björn
participants (1)
-
yg-boost-users@m.gmane.org