I am attempting to upgrade to boost 1.40 and have found an issue with
cuthill_mckee_ordering.hpp. The following code demonstrates the
issue.
#include
#include
int main() {
typedef boost::property VertexProperty;
typedef boost::adjacency_matrix MyGraph;
typedef boost::graph_traits<MyGraph>::vertex_descriptor Vertex;
MyGraph graph(0);
// Fill graph with nodes, etc....
// Perform reverse cuthill mckee...
std::vector<Vertex> inv_perm(boost::num_vertices(graph));
{
boost::cuthill_mckee_ordering(graph, inv_perm.rbegin()); //
'has_no_vertices' error...
// do stuff with ordered graph...
}
return 0;
}
This code builds cleanly against 1.36 (my previous version) but fails
when built against 1.40 with the following:
....boost/graph/cuthill_mckee_ordering.hpp(172): 'has_no_vertices':
identifer not found
Looking at the code, the function boost::cuthill_mckee_ordering is
calling has_no_vertices (with no specified namespace).
has_no_vertices (in graph_utility.hpp) lives in the boost::graph
namespace. Changing the line to graph::has_no_vertices fixes the
compiler error.
Is this possibly a bug in 1.40 or am I doing something wrong?
Thanks,
Ryan