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 vertex_type;
typedef boost::property
vertex_index;
typedef boost::property vertex_property;
typedef boost::adjacency_list tree;
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.
Björn