[Graph] compile error while inheriting boost graph

Hi, My attempt to inherit boost graph failed. The compiler complains that it is not aware of boost graph classes. Would appreciate if someone can tell if this due to boost intricacies or just regular mistake in the syntax. //Declare boost graph within namespace boostd namespace boostd { typedef adjacency_list<listS, listS, ... > Graph; typedef graph_traits<Graph>::vertex_descriptor Vertex; } class DerivedGraph: public boostd::Graph{ public: class Node: public boostd::Vertex{ //error on this line }; }; The compiler complains error: expected class-name before '{' token Thanks sandeep

class DerivedGraph: public boostd::Graph{ public: class Node: public boostd::Vertex{ // error on this line }; };
The compiler complains error: expected class-name before '{' token
That's because vertex descriptors for listS vector storage have type void* - which you can't list as a base class. Andrew Sutton asutton@cs.kent.edu
participants (2)
-
Andrew Sutton
-
Sandeep Gupta