Subject: [Boost-bugs] [Boost C++ Libraries] #3376: graph::cuthill_mckee_ordering has_no_vertices cannot be found
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-08-31 17:38:21
#3376: graph::cuthill_mckee_ordering has_no_vertices cannot be found
--------------------------------------------------------+-------------------
Reporter: Ryan W. Frenz <rfrenz@â¦> | Owner: asutton
Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: graph
Version: Boost 1.40.0 | Severity: Regression
Keywords: graph, cuthill_mckee, compiler error, msvc |
--------------------------------------------------------+-------------------
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:
{{{
#!cpp
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.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3376> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC