
I would like to use a graph and add/remove vertices frequently so i try to use a list for the vertices. At the begining, i would like to sort my vertices using dfs or topological_sort. But my program refuses to compile, apparently there is a problem with a property map for the colors. (c:/Boost/include/boost-1_33_1/boost/property_map.hpp:319: instantiated from `void boost::put....'). How can i make a dfs with such a graph ? Are there special requirements for using dfs or topologic_sort on a graph ? Thanks, Renaud. Following is a small example illlustrating the problem. #include <boost/graph/graph_traits.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/depth_first_search.hpp> #include <boost/graph/visitors.hpp> #include <boost/graph/topological_sort.hpp> #include <iterator> typedef boost::adjacency_list<boost::vecS, boost::listS, boost::bidirectionalS, int, int > Graph; typedef boost::graph_traits<Graph>::vertex_descriptor Vertex; typedef std::vector< Vertex > Vertices; int main() { Graph g; Vertices vs; boost::topological_sort(g, back_inserter(vs)); }