From c3f824ce13d83da71f55201f4608db64478e4ef1 Mon Sep 17 00:00:00 2001
From: Richard Guenther <rguenther@suse.de>
Date: Mon, 11 Dec 2006 10:48:56 +0000
Subject: [PATCH] traits.hpp: Qualify types.

2006-12-11  Richard Guenther  <rguenther@suse.de>
	    Paolo Carlini  <pcarlini@suse.de>

	* include/ext/pb_ds/detail/pat_trie_/traits.hpp: Qualify types.
	* include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Likewise.
	* include/ext/rope: Likewise.
	* include/bits/stl_tree.h (struct _Rb_tree): Change the _Link_type
	typedefs to use _Rb_tree_node<_Val> directly.
	(_M_get_node, _M_put_node): Use _Link_type.

Co-Authored-By: Paolo Carlini <pcarlini@suse.de>

From-SVN: r119732
---
 libstdc++-v3/ChangeLog                                 | 10 ++++++++++
 libstdc++-v3/include/bits/stl_tree.h                   |  9 ++++-----
 .../ext/pb_ds/detail/binary_heap_/binary_heap_.hpp     |  2 +-
 .../include/ext/pb_ds/detail/pat_trie_/traits.hpp      |  4 ++--
 libstdc++-v3/include/ext/rope                          | 10 ++++------
 5 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index a1f612946a1c..0b85eadb6a84 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,13 @@
+2006-12-11  Richard Guenther  <rguenther@suse.de>
+	    Paolo Carlini  <pcarlini@suse.de>
+
+	* include/ext/pb_ds/detail/pat_trie_/traits.hpp: Qualify types.
+	* include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Likewise.
+	* include/ext/rope: Likewise.
+	* include/bits/stl_tree.h (struct _Rb_tree): Change the _Link_type
+	typedefs to use _Rb_tree_node<_Val> directly.
+	(_M_get_node, _M_put_node): Use _Link_type.
+
 2006-12-10  Paolo Carlini  <pcarlini@suse.de>
 
 	* src/valarray-inst.cc (__gslice_to_index): Optimize performance.
diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h
index a4215af7b76a..d2efb3aa4eb7 100644
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -326,7 +326,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     protected:
       typedef _Rb_tree_node_base* _Base_ptr;
       typedef const _Rb_tree_node_base* _Const_Base_ptr;
-      typedef _Rb_tree_node<_Val> _Rb_tree_node;
 
     public:
       typedef _Key key_type;
@@ -335,8 +334,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       typedef const value_type* const_pointer;
       typedef value_type& reference;
       typedef const value_type& const_reference;
-      typedef _Rb_tree_node* _Link_type;
-      typedef const _Rb_tree_node* _Const_Link_type;
+      typedef _Rb_tree_node<_Val>* _Link_type;
+      typedef const _Rb_tree_node<_Val>* _Const_Link_type;
       typedef size_t size_type;
       typedef ptrdiff_t difference_type;
       typedef _Alloc allocator_type;
@@ -354,12 +353,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       { return allocator_type(_M_get_Node_allocator()); }
 
     protected:
-      _Rb_tree_node*
+      _Link_type
       _M_get_node()
       { return _M_impl._Node_allocator::allocate(1); }
 
       void
-      _M_put_node(_Rb_tree_node* __p)
+      _M_put_node(_Link_type __p)
       { _M_impl._Node_allocator::deallocate(__p, 1); }
 
       _Link_type
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
index 659b7732866f..b32479b99d1f 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
@@ -81,7 +81,7 @@ namespace pb_ds
     entry_cmp<Value_Type, Cmp_Fn, is_simple<Value_Type>::value, Allocator>::type
 
 #define PB_DS_RESIZE_POLICY_DEC	\
-    resize_policy<typename Allocator::size_type>
+    pb_ds::detail::resize_policy<typename Allocator::size_type>
 
     /**
      * class description = "Base class for some types of h3ap$">
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/traits.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/traits.hpp
index b10380937bc7..59aa30982684 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/traits.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/traits.hpp
@@ -93,7 +93,7 @@ namespace pb_ds
       typedef E_Access_Traits e_access_traits;
 
       typedef
-      synth_e_access_traits<
+      pb_ds::detail::synth_e_access_traits<
 	type_traits,
 	false,
 	e_access_traits>
@@ -254,7 +254,7 @@ namespace pb_ds
       typedef E_Access_Traits e_access_traits;
 
       typedef
-      synth_e_access_traits<
+      pb_ds::detail::synth_e_access_traits<
 	type_traits,
 	true,
 	e_access_traits>
diff --git a/libstdc++-v3/include/ext/rope b/libstdc++-v3/include/ext/rope
index 0cfd21e44625..389fd0958d82 100644
--- a/libstdc++-v3/include/ext/rope
+++ b/libstdc++-v3/include/ext/rope
@@ -78,8 +78,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
   using std::size_t;
   using std::ptrdiff_t;
   using std::allocator;
-  using std::iterator;
-  using std::reverse_iterator;
   using std::_Destroy;
 
   // The _S_eos function is used for those functions that
@@ -165,7 +163,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
   template<class _Sequence, size_t _Buf_sz = 100>
     class sequence_buffer
-    : public iterator<std::output_iterator_tag, void, void, void, void>
+    : public std::iterator<std::output_iterator_tag, void, void, void, void>
     {
     public:
       typedef typename _Sequence::value_type value_type;
@@ -1023,7 +1021,7 @@ protected:
   
   template<class _CharT, class _Alloc>
     class _Rope_iterator_base
-    : public iterator<std::random_access_iterator_tag, _CharT>
+    : public std::iterator<std::random_access_iterator_tag, _CharT>
     {
       friend class rope<_CharT, _Alloc>;
     public:
@@ -2017,7 +2015,7 @@ protected:
 	//  but it's harder to make guarantees.
       }
 
-      typedef reverse_iterator<const_iterator> const_reverse_iterator;
+      typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
 
       const_reverse_iterator
       rbegin() const
@@ -2549,7 +2547,7 @@ protected:
       mutable_end()
       { return(iterator(this, size())); }
 
-      typedef reverse_iterator<iterator> reverse_iterator;
+      typedef std::reverse_iterator<iterator> reverse_iterator;
       
       reverse_iterator
       mutable_rbegin()
-- 
GitLab