[Graph] Error in cuthill_mckee_ordering in 1.40

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 <boost/graph/adjacency_matrix.hpp> #include <boost/graph/cuthill_mckee_ordering.hpp> int main() { typedef boost::property<boost::vertex_name_t, std::string> VertexProperty; typedef boost::adjacency_matrix<boost::undirectedS, VertexProperty> 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

On Mon, 31 Aug 2009, Ryan W. Frenz wrote:
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 <boost/graph/adjacency_matrix.hpp> #include <boost/graph/cuthill_mckee_ordering.hpp>
int main() { typedef boost::property<boost::vertex_name_t, std::string> VertexProperty; typedef boost::adjacency_matrix<boost::undirectedS, VertexProperty> 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?
This looks like a bug; do you have a small, self-contained example that would demonstrate the problem? Could you please file it in Trac so we can have a record of it and work on it? Thank you. -- Jeremiah Willcock

On Mon, Aug 31, 2009 at 12:46 PM, Jeremiah Willcock<jewillco@osl.iu.edu> wrote:
This looks like a bug; do you have a small, self-contained example that would demonstrate the problem? Could you please file it in Trac so we can have a record of it and work on it? Thank you.
The code included with my original post recreates the issue as-is. I have filed a ticket in Trac (#3376) with this code and related info. Thanks, Ryan
participants (2)
-
Jeremiah Willcock
-
Ryan W. Frenz