Boost logo

Boost Users :

Subject: [Boost-users] Boost Graph Library mysterious compile errors
From: Lindley M French (lfrench1_at_[hidden])
Date: 2009-04-28 00:26:28


I'm getting some mysterious compile errors relating to boost::detail::error_property_not_found. Truely massive errors, well too large to get any useful information out of.....ah, templates.

I eventually figured out that these sorts of errors are usually related to BGL algorithm calls which can't find the properties they need. (Wow, thanks for pointing me right at the source, template error...) Well, the only algorithms I'm calling right now are connected_component and kruskal_minimum_spanning_tree.

One such instance occurs with a particular connected_component call:

typedef boost::adjacency_list<
        boost::listS, boost::vecS, boost::undirectedS,
        RegionProperties, EdgeProperties> Graph;

template <typename Graph>
struct edge_on
{
        edge_on(): m_G(NULL) { }
        edge_on(const Graph &G) : m_G(&G) { }
        template <typename Edge>
        bool operator()(const Edge& e) const
        {
                        return (*m_G)[e].on;
        }
        const Graph *m_G;
};

...
//function arg
....(Graph &G,...

filtered_graph<Graph, edge_on<Graph> > G_on_edges(G, edge_on<Graph>(G));
std::vector<int> component(num_vertices(G_on_edges));
int num_comps = connected_components(G_on_edges, &component[0]);

Do you see anything wrong there?

The kruskel call (which is producing more such errors) is

Graph comp_G;
....
vector<Edge> mstedges;
mstedges.reserve(num_vertices(comp_G));
kruskal_minimum_spanning_tree(comp_G,std::back_inserter(mstedges));

I really have no idea what might be wrong here.


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