Boost logo

Boost Users :

Subject: [Boost-users] BGL - VertexList of adjacency_list = boost::setS?
From: Ondrej Sluciak (ondrej.sluciak_at_[hidden])
Date: 2009-10-30 09:29:31


Is there some reason why the vertexlist parameter of adjacency_list
cannot be of "setS" type? If I do something like:

typedef boost::adjacency_list<boost::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<boost::detail::adj_list_gen<Graph,VertexListS,OutEdgeListS,DirectedS,VertexProperty,EdgeProperty,GraphProperty,EdgeListS>::config>(void
*,void *,boost::directed_graph_helper<Config> &)' : cannot convert
parameter 2 from 'int' to 'void *'
c:\mycode\boosttest\boosttest\boosttest.cpp 18

If I change it to vecS, then it works. I know the std::set is somehow
different from vector or list, but since I don't understand it so well,
I don't know why the vertexList cannot be setS, and for example
OutEdgeList (1st parameter of adjacency_list) can. Thanks for clarifynig.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net