
Suppose I have the following: template <class T> class Graph { // Adapter class that I use for my purposes typedef typename boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, T> innerGraph; typedef typename boost::graph_traits<innerGraph>::vertex_descriptor VertexDescriptor; innerGraph G; public: void addVertex(const T& vertex); bool containsVertex(const T& vertex) const; void addEdge(const T& from, const T& to); // More stuff here }; The intent of this adapter class is to basically abstract out all the mentions of stuff like the descriptors and such. So a good helper function to this end would be a function that retrieves the VertexDescriptor for a given T, if it exists. Is there such a function already in the BGL, or do I have to manage that separately (ie. having an external map)?