Boost logo

Boost Users :

From: Nicola Vitacolonna (vitacolo_at_[hidden])
Date: 2005-12-23 08:25:39


Hi,
consider the following (excerpt from a) class wrapper around an
adjacency_list:

using namespace boost;

template <typename VertexProperty = no_property>
class MyGraphWrapper {
private:
     typedef adjacency_list<vecS, listS, bidirectionalS,
property<vertex_index_t, int, VertexProperty> > GraphImpl;
// ...
};

I want to store some property (in this case, a vertex index) inside
the graph implementation, but at the same time I want to allow the
client to specify further properties via the template parameter. May
the client use the bundled property mechanism, e.g.

struct Label { std::string lab; };
MyGraphWrapper<Label> g;

My test compiled and it seems to run fine. Is it really possible/safe
to mix bundle properties with property lists in this way? Or, is
there a way to avoid property lists?

Nicola



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net