From: Paolo Carlini Date: Wed, 9 Jun 2004 21:37:46 +0000 (+0000) Subject: re PR libstdc++/15775 (Allocator::pointer consistently ignored) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7338fc64dde8ab8315095e226c1b9e2469a4e369;p=gcc.git re PR libstdc++/15775 (Allocator::pointer consistently ignored) 2004-06-09 Paolo Carlini PR libstdc++/15775 * include/bits/stl_deque.h: Consistently with stl_set.h, define pointer as allocator's pointer, likewise for reference, const_pointer, and const_reference. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_vector.h: Likewise. From-SVN: r82857 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e2855479540..20d5a7d3b02 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,14 @@ +2004-06-09 Paolo Carlini + + PR libstdc++/15775 + * include/bits/stl_deque.h: Consistently with stl_set.h, define + pointer as allocator's pointer, likewise for reference, + const_pointer, and const_reference. + * include/bits/stl_list.h: Likewise. + * include/bits/stl_map.h: Likewise. + * include/bits/stl_multimap.h: Likewise. + * include/bits/stl_vector.h: Likewise. + 2004-06-09 Benjamin Kosnik * crossconfig.m4: Remove signbit, signbitf, signbitl. diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h index a3d9f51ea39..d4f243939fd 100644 --- a/libstdc++-v3/include/bits/stl_deque.h +++ b/libstdc++-v3/include/bits/stl_deque.h @@ -595,14 +595,14 @@ namespace _GLIBCXX_STD public: typedef _Tp value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; + typedef typename _Alloc::pointer pointer; + typedef typename _Alloc::const_pointer const_pointer; + typedef typename _Alloc::reference reference; + typedef typename _Alloc::const_reference const_reference; typedef typename _Base::iterator iterator; typedef typename _Base::const_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; - typedef value_type& reference; - typedef const value_type& const_reference; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef typename _Base::allocator_type allocator_type; diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index f55915b1e2c..1671c9c9d99 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -394,18 +394,18 @@ namespace _GLIBCXX_STD typedef _List_base<_Tp, _Alloc> _Base; public: - typedef _Tp value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef _List_iterator<_Tp> iterator; - typedef _List_const_iterator<_Tp> const_iterator; - typedef std::reverse_iterator const_reverse_iterator; - typedef std::reverse_iterator reverse_iterator; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef typename _Base::allocator_type allocator_type; + typedef _Tp value_type; + typedef typename _Alloc::pointer pointer; + typedef typename _Alloc::const_pointer const_pointer; + typedef typename _Alloc::reference reference; + typedef typename _Alloc::const_reference const_reference; + typedef _List_iterator<_Tp> iterator; + typedef _List_const_iterator<_Tp> const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef typename _Base::allocator_type allocator_type; protected: // Note that pointers-to-_Node's can be ctor-converted to diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h index bd78f57cdf9..8535ae5f268 100644 --- a/libstdc++-v3/include/bits/stl_map.h +++ b/libstdc++-v3/include/bits/stl_map.h @@ -126,17 +126,17 @@ namespace _GLIBCXX_STD public: // many of these are specified differently in ISO, but the following are // "functionally equivalent" - typedef typename _Rep_type::allocator_type allocator_type; - typedef typename _Rep_type::reference reference; - typedef typename _Rep_type::const_reference const_reference; - typedef typename _Rep_type::iterator iterator; - typedef typename _Rep_type::const_iterator const_iterator; - typedef typename _Rep_type::size_type size_type; - typedef typename _Rep_type::difference_type difference_type; - typedef typename _Rep_type::pointer pointer; - typedef typename _Rep_type::const_pointer const_pointer; - typedef typename _Rep_type::reverse_iterator reverse_iterator; - typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + typedef typename _Alloc::pointer pointer; + typedef typename _Alloc::const_pointer const_pointer; + typedef typename _Alloc::reference reference; + typedef typename _Alloc::const_reference const_reference; + typedef typename _Rep_type::allocator_type allocator_type; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; // [23.3.1.1] construct/copy/destroy // (get_allocator() is normally listed in this section, but seems to have diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h index c44aa74a692..e080f9aaba7 100644 --- a/libstdc++-v3/include/bits/stl_multimap.h +++ b/libstdc++-v3/include/bits/stl_multimap.h @@ -142,19 +142,18 @@ namespace _GLIBCXX_STD public: // many of these are specified differently in ISO, but the following are // "functionally equivalent" + typedef typename _Alloc::pointer pointer; + typedef typename _Alloc::const_pointer const_pointer; + typedef typename _Alloc::reference reference; + typedef typename _Alloc::const_reference const_reference; typedef typename _Rep_type::allocator_type allocator_type; - typedef typename _Rep_type::reference reference; - typedef typename _Rep_type::const_reference const_reference; typedef typename _Rep_type::iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; - typedef typename _Rep_type::pointer pointer; - typedef typename _Rep_type::const_pointer const_pointer; typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; - // [23.3.2] construct/copy/destroy // (get_allocator() is also listed in this section) /** diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index 8a741b4d9dc..f0ba3328002 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -153,19 +153,19 @@ namespace _GLIBCXX_STD typedef vector<_Tp, _Alloc> vector_type; public: - typedef _Tp value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; + typedef _Tp value_type; + typedef typename _Alloc::pointer pointer; + typedef typename _Alloc::const_pointer const_pointer; + typedef typename _Alloc::reference reference; + typedef typename _Alloc::const_reference const_reference; typedef __gnu_cxx::__normal_iterator iterator; typedef __gnu_cxx::__normal_iterator const_iterator; - typedef std::reverse_iterator const_reverse_iterator; - typedef std::reverse_iterator reverse_iterator; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef typename _Base::allocator_type allocator_type; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef typename _Base::allocator_type allocator_type; protected: /** @if maint