Opened 13 years ago

Closed 13 years ago

#3376 closed Bugs (fixed)

graph::cuthill_mckee_ordering has_no_vertices cannot be found

Reported by: Ryan W. Frenz <rfrenz@…> Owned by: Andrew Sutton
Milestone: Boost 1.41.0 Component: graph
Version: Boost 1.40.0 Severity: Regression
Keywords: graph, cuthill_mckee, compiler error, msvc Cc:

Description

In version 1.40, lines 135 and 171 of graph/cuthill_mckee_ordering.hpp fail to compile with Microsoft Visual Studio 2005 (VC 8.0).

The following example demonstrates the issue:

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());
   // do stuff with ordered graph...
 }

 return 0;
}

The call to boost::cuthill_mckee_ordering fails with:

../../boost/graph/cuthill_mckee_ordering.hpp(171) : error C3861: 'has_no_vertices': identifier not found

Inspecting the code, has_no_vertices exists in the boost::graph namespace, but in this case it is called from boost::cuthill_mckee_ordering with no explicit namespace. Changing it to graph::has_no_vertices or boost::graph::has_no_vertices fixes the issue.

Change History (1)

comment:1 by Jeremiah Willcock, 13 years ago

Resolution: fixed
Status: newclosed

(In [56016]) Added qualification to has_no_vertices in cuthill_mckee_ordering; fixes #3376

Note: See TracTickets for help on using tickets.