Boost logo

Boost Users :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2006-06-02 11:06:16


On Jun 2, 2006, at 10:29 AM, Cromwell Enage wrote:

> The following code used to work, but no longer does.
>
> typedef boost::adjacency_list<> G;
> typedef boost::graph_traits<G>::edge_descriptor E;
> G graph;
> std::vector<E> spanning_tree;
> boost::kruskal_minimum_spanning_tree(
> graph
> , std::back_inserter(spanning_tree)
> );

FWIW, I changes the typedef of G to:

          typedef boost::adjacency_list<boost::vecS, boost::vecS,
boost::undirectedS, boost::no_property,
boost::property<boost::edge_weight_t, double> > G;

since we need an edge weight to use Kruskal's algorithm.

> Somehow the concept checking became too restrictive,
> and type E is now expected to be Assignable, which
> currently doesn't seem to be the case.
>
> Any fixes or workarounds?

Which compiler is this? I found (and, just now, suppressed) a warning
on GCC 3, but the code above compiles for me on GCC 3.3 and 4.0.1.
Perhaps my change will fix the problem you are seeing?

        Doug


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