|
Boost Testing : |
From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2006-06-19 10:35:19
I'm running into errors in my Solaris 10 test runs where a typedef in
boost/graph/king_ordering.hpp and
boot/graph/cuthill_mckee_ordering.hpp is conflicting with a macro
defined in a system header:
The Solaris header file <sys/regset.h>, which appears to be pulled in
as a by-product of <cstdlib> on Solaris defines the macro DS to 3,
resulting in these errors.
Perhaps this typedef can be changed to something slightly longer or
more lower-casey? Here's a proposal that works for me:
cvs diff: Diffing boost/graph
Index: boost/graph/cuthill_mckee_ordering.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/graph/cuthill_mckee_ordering.hpp,v
retrieving revision 1.24
diff -u -r1.24 cuthill_mckee_ordering.hpp
--- boost/graph/cuthill_mckee_ordering.hpp 6 Feb 2006 22:12:57
-0000 1.24
+++ boost/graph/cuthill_mckee_ordering.hpp 19 Jun 2006 14:34:21 -0000
@@ -41,9 +41,9 @@
void finish_vertex(Vertex, Graph&) {
using std::sort;
- typedef typename property_traits<DegreeMap>::value_type DS;
+ typedef typename property_traits<DegreeMap>::value_type ds_type;
- typedef indirect_cmp<DegreeMap, std::less<DS> > Compare;
+ typedef indirect_cmp<DegreeMap, std::less<ds_type> > Compare;
Compare comp(degree);
sort(Qptr->begin()+index_begin, Qptr->end(), comp);
@@ -74,7 +74,7 @@
{
//create queue, visitor...don't forget namespaces!
- typedef typename property_traits<DegreeMap>::value_type DS;
+ typedef typename property_traits<DegreeMap>::value_type ds_type;
typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
typedef typename boost::sparse::sparse_ordering_queue<Vertex> queue;
typedef typename detail::bfs_rcm_visitor<OutputIterator, queue,
DegreeMap> Visitor;
Index: boost/graph/king_ordering.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/graph/king_ordering.hpp,v
retrieving revision 1.11
diff -u -r1.11 king_ordering.hpp
--- boost/graph/king_ordering.hpp 6 Feb 2006 22:12:57 -0000 1.11
+++ boost/graph/king_ordering.hpp 19 Jun 2006 14:34:21 -0000
@@ -193,18 +193,18 @@
ColorMap color, DegreeMap degree,
VertexIndexMap index_map)
{
- typedef typename property_traits<DegreeMap>::value_type DS;
+ typedef typename property_traits<DegreeMap>::value_type ds_type;
typedef typename property_traits<ColorMap>::value_type ColorValue;
typedef color_traits<ColorValue> Color;
typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
- typedef iterator_property_map<typename std::vector<DS>::iterator,
VertexIndexMap, DS, DS&> PseudoDegreeMap;
- typedef indirect_cmp<PseudoDegreeMap, std::less<DS> > Compare;
+ typedef iterator_property_map<typename
std::vector<ds_type>::iterator, VertexIndexMap, ds_type, ds_type&>
PseudoDegreeMap;
+ typedef indirect_cmp<PseudoDegreeMap, std::less<ds_type> > Compare;
typedef typename boost::sparse::sparse_ordering_queue<Vertex> queue;
typedef typename detail::bfs_king_visitor<OutputIterator, queue,
Compare,
PseudoDegreeMap, std::vector<int>, VertexIndexMap > Visitor;
typedef typename graph_traits<Graph>::vertices_size_type
vertices_size_type;
- std::vector<DS> pseudo_degree_vec(num_vertices(g));
+ std::vector<ds_type> pseudo_degree_vec(num_vertices(g));
PseudoDegreeMap pseudo_degree(pseudo_degree_vec.begin(), index_map);
typename graph_traits<Graph>::vertex_iterator ui, ui_end;
cvs diff: Diffing boost/graph/detail
-- Caleb Epstein