BGL - VertexList of adjacency_list = boost::setS?

Is there some reason why the vertexlist parameter of adjacency_list
cannot be of "setS" type? If I do something like:
typedef boost::adjacency_listboost::listS,boost::setS Graph;
Graph g;
boost::add_edge(0,1, g);
I always get this error:
Error 1 error C2664: 'std::pair<_Ty1,_Ty2>
boost::add_edge

typedef boost::adjacency_listboost::listS,boost::setS Graph; Graph g; boost::add_edge(0,1, g);
0 and 1 are not descriptors if you use any selector other than vecS, hence the "cannot convert" error. There should be a function vertex(n, g) that you can use to return a descriptor to the nth vertex in these cases, but be forewarned: it's O(V). add_edge(vertex(0), vertex(1), g); Andrew Sutton andrew.n.sutton@gmail.com
participants (2)
-
Andrew Sutton
-
Ondrej Sluciak