[graph] adjacency_list constructor fails, wrong usage?

Hi,
I originally wanted to construct an undirected graph from a directed
graph and vice versa. For this purpose i tried to use
template <class EdgeIterator>
adjacency_list(EdgeIterator first, EdgeIterator last,
vertices_size_type n,
edges_size_type m = 0,
const GraphProperty& p = GraphProperty())
as shown in
http://www.boost.org/doc/libs/1_47_0/libs/graph/doc/adjacency_list.html
but i do not even manage to construct a graph from the same type with
this constructor. What am i missing? Please have a look at the example
below. If you uncomment the last two lines, the code will not compile.
// begin code
#include <iostream>
#include

any suggestions?
If I construct a vector of std::pair

On Mon, 14 Nov 2011, Anders Wallin wrote:
any suggestions?
If I construct a vector of std::pair
explicitly I can get this to compile. But it's hardly an elegant way to copy a graph...
Have you tried copy_graph() (http://www.boost.org/doc/libs/1_47_0/libs/graph/doc/copy_graph.html)? Is there some reason that does not work? -- Jeremiah Willcock
participants (3)
-
Anders Wallin
-
Christoph
-
Jeremiah Willcock