Commit c3f824ce by Richard Guenther Committed by Paolo Carlini

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
parent 8a4a83ed
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> 2006-12-10 Paolo Carlini <pcarlini@suse.de>
* src/valarray-inst.cc (__gslice_to_index): Optimize performance. * src/valarray-inst.cc (__gslice_to_index): Optimize performance.
......
...@@ -326,7 +326,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -326,7 +326,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
protected: protected:
typedef _Rb_tree_node_base* _Base_ptr; typedef _Rb_tree_node_base* _Base_ptr;
typedef const _Rb_tree_node_base* _Const_Base_ptr; typedef const _Rb_tree_node_base* _Const_Base_ptr;
typedef _Rb_tree_node<_Val> _Rb_tree_node;
public: public:
typedef _Key key_type; typedef _Key key_type;
...@@ -335,8 +334,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -335,8 +334,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typedef const value_type* const_pointer; typedef const value_type* const_pointer;
typedef value_type& reference; typedef value_type& reference;
typedef const value_type& const_reference; typedef const value_type& const_reference;
typedef _Rb_tree_node* _Link_type; typedef _Rb_tree_node<_Val>* _Link_type;
typedef const _Rb_tree_node* _Const_Link_type; typedef const _Rb_tree_node<_Val>* _Const_Link_type;
typedef size_t size_type; typedef size_t size_type;
typedef ptrdiff_t difference_type; typedef ptrdiff_t difference_type;
typedef _Alloc allocator_type; typedef _Alloc allocator_type;
...@@ -354,12 +353,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -354,12 +353,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return allocator_type(_M_get_Node_allocator()); } { return allocator_type(_M_get_Node_allocator()); }
protected: protected:
_Rb_tree_node* _Link_type
_M_get_node() _M_get_node()
{ return _M_impl._Node_allocator::allocate(1); } { return _M_impl._Node_allocator::allocate(1); }
void void
_M_put_node(_Rb_tree_node* __p) _M_put_node(_Link_type __p)
{ _M_impl._Node_allocator::deallocate(__p, 1); } { _M_impl._Node_allocator::deallocate(__p, 1); }
_Link_type _Link_type
......
...@@ -81,7 +81,7 @@ namespace pb_ds ...@@ -81,7 +81,7 @@ namespace pb_ds
entry_cmp<Value_Type, Cmp_Fn, is_simple<Value_Type>::value, Allocator>::type entry_cmp<Value_Type, Cmp_Fn, is_simple<Value_Type>::value, Allocator>::type
#define PB_DS_RESIZE_POLICY_DEC \ #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$"> * class description = "Base class for some types of h3ap$">
......
...@@ -93,7 +93,7 @@ namespace pb_ds ...@@ -93,7 +93,7 @@ namespace pb_ds
typedef E_Access_Traits e_access_traits; typedef E_Access_Traits e_access_traits;
typedef typedef
synth_e_access_traits< pb_ds::detail::synth_e_access_traits<
type_traits, type_traits,
false, false,
e_access_traits> e_access_traits>
...@@ -254,7 +254,7 @@ namespace pb_ds ...@@ -254,7 +254,7 @@ namespace pb_ds
typedef E_Access_Traits e_access_traits; typedef E_Access_Traits e_access_traits;
typedef typedef
synth_e_access_traits< pb_ds::detail::synth_e_access_traits<
type_traits, type_traits,
true, true,
e_access_traits> e_access_traits>
......
...@@ -78,8 +78,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -78,8 +78,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
using std::size_t; using std::size_t;
using std::ptrdiff_t; using std::ptrdiff_t;
using std::allocator; using std::allocator;
using std::iterator;
using std::reverse_iterator;
using std::_Destroy; using std::_Destroy;
// The _S_eos function is used for those functions that // The _S_eos function is used for those functions that
...@@ -165,7 +163,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -165,7 +163,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
template<class _Sequence, size_t _Buf_sz = 100> template<class _Sequence, size_t _Buf_sz = 100>
class sequence_buffer 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: public:
typedef typename _Sequence::value_type value_type; typedef typename _Sequence::value_type value_type;
...@@ -1023,7 +1021,7 @@ protected: ...@@ -1023,7 +1021,7 @@ protected:
template<class _CharT, class _Alloc> template<class _CharT, class _Alloc>
class _Rope_iterator_base 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>; friend class rope<_CharT, _Alloc>;
public: public:
...@@ -2017,7 +2015,7 @@ protected: ...@@ -2017,7 +2015,7 @@ protected:
// but it's harder to make guarantees. // 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 const_reverse_iterator
rbegin() const rbegin() const
...@@ -2549,7 +2547,7 @@ protected: ...@@ -2549,7 +2547,7 @@ protected:
mutable_end() mutable_end()
{ return(iterator(this, size())); } { return(iterator(this, size())); }
typedef reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator;
reverse_iterator reverse_iterator
mutable_rbegin() mutable_rbegin()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment