re PR libstdc++/15775 (Allocator::pointer consistently ignored)
authorPaolo Carlini <pcarlini@suse.de>
Wed, 9 Jun 2004 21:37:46 +0000 (21:37 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 9 Jun 2004 21:37:46 +0000 (21:37 +0000)
2004-06-09  Paolo Carlini  <pcarlini@suse.de>

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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_deque.h
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/include/bits/stl_map.h
libstdc++-v3/include/bits/stl_multimap.h
libstdc++-v3/include/bits/stl_vector.h

index e28554795401405388b33ab2a9699bded0c0698b..20d5a7d3b025f1a259e064ffb4b418cf12efe58d 100644 (file)
@@ -1,3 +1,14 @@
+2004-06-09  Paolo Carlini  <pcarlini@suse.de>
+
+       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  <bkoz@redhat.com>
 
        * crossconfig.m4: Remove signbit, signbitf, signbitl.   
index a3d9f51ea39a675e5ca9137a1e987459448fa7b7..d4f243939fde947620b9fc48ae236e9b80e5877b 100644 (file)
@@ -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_iterator>   const_reverse_iterator;
       typedef std::reverse_iterator<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;
index f55915b1e2c54d56efde7ef9687a1387524f079b..1671c9c9d99a009014f13ac3611d0570dcef1879 100644 (file)
@@ -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_iterator>     const_reverse_iterator;
-      typedef std::reverse_iterator<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_iterator>      const_reverse_iterator;
+      typedef std::reverse_iterator<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
index bd78f57cdf90da3577e9cae9a8ea360e50a80ebe..8535ae5f2680bab165c17e529f293386d33dc647 100644 (file)
@@ -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
index c44aa74a6923f21bf990b7ba938e8b97b0bd0d04..e080f9aaba7eb1e2dd932259f2f602e3ffa1d15a 100644 (file)
@@ -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)
       /**
index 8a741b4d9dc4fab53c3520d48993f74b611a93c0..f0ba33280029bb0a17fb29ae409e307d88409c8d 100644 (file)
@@ -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<pointer, vector_type> iterator;
       typedef __gnu_cxx::__normal_iterator<const_pointer, vector_type>
       const_iterator;
-      typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-      typedef std::reverse_iterator<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_iterator>  const_reverse_iterator;
+      typedef std::reverse_iterator<iterator>           reverse_iterator;
+      typedef size_t                                    size_type;
+      typedef ptrdiff_t                                         difference_type;
+      typedef typename _Base::allocator_type            allocator_type;
 
     protected:
       /** @if maint