|
Boost : |
From: Craig Rodrigues (rodrigc_at_[hidden])
Date: 2002-03-03 23:39:57
Hi,
This patch fixes many warnings that gcc 3.1
emits about "implicit typenames" being declared.
Index: isomorphism.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/graph/isomorphism.hpp,v
retrieving revision 1.24
diff -u -u -r1.24 isomorphism.hpp
--- isomorphism.hpp 13 Dec 2001 06:09:25 -0000 1.24
+++ isomorphism.hpp 4 Mar 2002 04:36:34 -0000
@@ -47,12 +47,12 @@
IndexMap2 index_map2;
std::vector<vertex1_t> dfs_vertices;
- typedef std::vector<vertex1_t>::iterator vertex_iter;
+ typedef typename std::vector<vertex1_t>::iterator vertex_iter;
std::vector<int> dfs_num_vec;
typedef safe_iterator_property_map<typename std::vector<int>::iterator, IndexMap1> DFSNumMap;
DFSNumMap dfs_num;
std::vector<edge1_t> ordered_edges;
- typedef std::vector<edge1_t>::iterator edge_iter;
+ typedef typename std::vector<edge1_t>::iterator edge_iter;
std::vector<char> in_S_vec;
typedef safe_iterator_property_map<typename std::vector<char>::iterator,
Index: transitive_closure.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/graph/transitive_closure.hpp,v
retrieving revision 1.16
diff -u -u -r1.16 transitive_closure.hpp
--- transitive_closure.hpp 14 Dec 2001 15:02:31 -0000 1.16
+++ transitive_closure.hpp 4 Mar 2002 04:36:34 -0000
@@ -105,7 +105,7 @@
}
}
std::sort(adj.begin(), adj.end());
- std::vector < cg_vertex >::iterator di =
+ typename std::vector < cg_vertex >::iterator di =
std::unique(adj.begin(), adj.end());
if (di != adj.end())
adj.erase(di, adj.end());
@@ -118,7 +118,7 @@
vertex_index_map(identity_property_map()));
std::reverse(topo_order.begin(), topo_order.end());
size_type n = 0;
- for (std::vector < cg_vertex >::iterator iter = topo_order.begin();
+ for (typename std::vector < cg_vertex >::iterator iter = topo_order.begin();
iter != topo_order.end(); ++iter)
topo_number[*iter] = n++;
@@ -131,7 +131,7 @@
std::vector < std::vector < cg_vertex > >chains;
{
std::vector < cg_vertex > in_a_chain(num_vertices(CG));
- for (std::vector < cg_vertex >::iterator i = topo_order.begin();
+ for (typename std::vector < cg_vertex >::iterator i = topo_order.begin();
i != topo_order.end(); ++i) {
cg_vertex v = *i;
if (!in_a_chain[v]) {
@@ -170,10 +170,10 @@
std::vector <
cg_vertex >
(chains.size(), inf));
- for (std::vector < cg_vertex >::reverse_iterator i = topo_order.rbegin();
+ for (typename std::vector < cg_vertex >::reverse_iterator i = topo_order.rbegin();
i != topo_order.rend(); ++i) {
cg_vertex u = *i;
- graph_traits < CG_t >::adjacency_iterator adj, adj_last;
+ typename graph_traits < CG_t >::adjacency_iterator adj, adj_last;
for (tie(adj, adj_last) = adjacent_vertices(u, CG);
adj != adj_last; ++adj) {
cg_vertex v = *adj;
@@ -208,10 +208,10 @@
g_to_tc_map[*i] = add_vertex(tc);
}
// Add edges between all the vertices in two adjacent SCCs
- graph_traits < CG_t >::vertex_iterator si, si_end;
+ typename graph_traits < CG_t >::vertex_iterator si, si_end;
for (tie(si, si_end) = vertices(CG); si != si_end; ++si) {
cg_vertex s = *si;
- graph_traits < CG_t >::adjacency_iterator i, i_end;
+ typename graph_traits < CG_t >::adjacency_iterator i, i_end;
for (tie(i, i_end) = adjacent_vertices(s, CG); i != i_end; ++i) {
cg_vertex t = *i;
for (size_type k = 0; k < components[s].size(); ++k)
Index: vector_as_graph.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/graph/vector_as_graph.hpp,v
retrieving revision 1.9
diff -u -u -r1.9 vector_as_graph.hpp
--- vector_as_graph.hpp 4 Nov 2001 00:26:55 -0000 1.9
+++ vector_as_graph.hpp 4 Mar 2002 04:36:34 -0000
@@ -199,7 +199,7 @@
add_edge(typename EdgeList::value_type u, typename EdgeList::value_type v,
std::vector<EdgeList, Allocator>& g)
{
- typedef detail::val_edge<EdgeList>::type edge_type;
+ typedef typename detail::val_edge<EdgeList>::type edge_type;
g[u].insert(g[u].end(), v);
return std::make_pair(edge_type(u, v), true);
}
-- Craig Rodrigues http://www.gis.net/~craigr rodrigc_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk