Boost logo

Boost Users :

Subject: Re: [Boost-users] [graph] Compilation problem using depth_first_visit with a listS as a VertexListS
From: alex (alexhighviz_at_[hidden])
Date: 2013-12-05 04:39:30

> From that I isolated the following code which compiles without any
> typedef adjacency_list < vecS, vecS,
GraphvizGraphProperty > Graph;
> depth_first_visit(_graph2, loop_head, default_dfs_visitor(),
_graph2), c));
> So this works fine!

> Then, I would like to change the type of graph, so more precisely, to use
a std::list (or listS) instead of a std..vector (vecS) for the VertexListS
> So the first line declaration becomes:

> typedef adjacency_list < vecS, listS,
GraphvizGraphProperty > Graph;
> //only the 2nd argument changes
> But then when I compile the code, I get 1 error during the compilation as
described hereafter.

"If the VertexList of the graph is vecS, then the graph has a builtin vertex
indices accessed via the property map for the vertex_index_t property."

So when you use listS instead you have to supply your own vertex index map.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at