On Dec 23, 2005, at 8:25 AM, Nicola Vitacolonna wrote:
template <typename VertexProperty = no_property> class MyGraphWrapper { private: typedef adjacency_list
> GraphImpl; // ... }; [snip] My test compiled and it seems to run fine. Is it really possible/ safe to mix bundle properties with property lists in this way?
Yes, this is correct.
Or, is there a way to avoid property lists?
Not cleanly. You could aggregate an index property with the
VertexProperty class (or derive from VertexProperty), e.g.,
template<typename BaseProperty>
struct WrapVertexProperty : public BaseProperty
{
WrapVertexProperty() : BaseProperty() { }
WrapVertexProperty(const BaseProperty& bp) : BaseProperty(bp) { }
std::size_t index; // your index property
};
template<>
struct WrapVertexProperty