BGL: need help with connected_components and boost::setS

Hi all,
can anyone help me with the compile error I get when compiling the following code? I'm using the MSVC 7.1 compiler (but it is not an internal compiler error).
The error occurs in the last line.
Your help is appreciated!
With kind regards
Maarten
#include

On Fri, 2007-04-13 at 04:50 -0700, Maarten Nieber wrote:
Graph g; ComponentPropertyMap vertexToComponent = boost::get(component_t(), g);
// THIS LINE DOES NOT COMPILE. No problem if boost::vecS is used instead of boost::setS in the Graph typedef! connected_components(g, vertexToComponent); }
I believe you do not want the () after the word component_t. In my
examples I do not have
boost::property_map

Hi Maarten!
can anyone help me with the compile error I get when compiling the following code? [...]
typedef boost::adjacency_list < boost::setS, boost::setS, boost::undirectedS, VertexComponentProperty > Graph;
According to the documentation, the second template argument of adjacency_list (VertexList) should select either a Sequence (e.g., std::list) or RandomAccessContainer (e.g., std::vector). So apparently this argument should not select a set! For the first template argument (OutEdgeList), it's okay to be boost::setS, though. OutEdgeList is allowed to select either a Sequence or an AssociativeContainer. http://www.boost.org/libs/graph/doc/using_adjacency_list.html Does that answer your question? See you tomorrow at LKEB! :-) -- Niels Dekker http://www.xs4all.nl/~nd/dekkerware Scientific programmer at LKEB, Leiden University Medical Center
participants (3)
-
Maarten Nieber
-
Niels Dekker - mail address until 2007-11-30
-
Stephen Torri