This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] libstdc++/21770: debug-mode bits


Hi,

as noticed by Benjamin: interestingly the issue boils down to a little
more consistency in the typedefs of the debug-mode containers.

Tested x86-linux (with/without -D_GLIBCXX_DEBUG)

Paolo.

///////////////
2005-06-06  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/21770 (cont: debug-mode)
	* include/debug/deque: Use _Base typedefs for pointer, const_pointer,
	reference, const_reference.
	* include/debug/list: Likewise.
	* include/debug/map.h: Likewise.
	* include/debug/multimap.h: Likewise.
	* include/debug/multiset.h: Likewise.
	* include/debug/set.h: Likewise.
	* include/debug/vector: Likewise.
diff -urN libstdc++-v3-orig/include/debug/deque libstdc++-v3/include/debug/deque
--- libstdc++-v3-orig/include/debug/deque	2004-04-16 21:04:04.000000000 +0200
+++ libstdc++-v3/include/debug/deque	2005-06-07 02:53:09.000000000 +0200
@@ -1,6 +1,6 @@
 // Debugging deque implementation -*- C++ -*-
 
-// Copyright (C) 2003, 2004
+// Copyright (C) 2003, 2004, 2005
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -46,8 +46,8 @@
       typedef __gnu_debug::_Safe_sequence<deque> _Safe_base;
 
     public:
-      typedef typename _Allocator::reference        reference;
-      typedef typename _Allocator::const_reference  const_reference;
+      typedef typename _Base::reference             reference;
+      typedef typename _Base::const_reference       const_reference;
 
       typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,deque>
 						    iterator;
@@ -59,8 +59,8 @@
 
       typedef _Tp				    value_type;
       typedef _Allocator			    allocator_type;
-      typedef typename _Allocator::pointer          pointer;
-      typedef typename _Allocator::const_pointer    const_pointer;
+      typedef typename _Base::pointer               pointer;
+      typedef typename _Base::const_pointer         const_pointer;
       typedef std::reverse_iterator<iterator>       reverse_iterator;
       typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
 
diff -urN libstdc++-v3-orig/include/debug/list libstdc++-v3/include/debug/list
--- libstdc++-v3-orig/include/debug/list	2004-04-16 21:04:04.000000000 +0200
+++ libstdc++-v3/include/debug/list	2005-06-07 02:54:48.000000000 +0200
@@ -1,6 +1,6 @@
 // Debugging list implementation -*- C++ -*-
 
-// Copyright (C) 2003, 2004
+// Copyright (C) 2003, 2004, 2005
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -47,8 +47,8 @@
       typedef __gnu_debug::_Safe_sequence<list>  _Safe_base;
 
     public:
-      typedef typename _Allocator::reference        reference;
-      typedef typename _Allocator::const_reference  const_reference;
+      typedef typename _Base::reference             reference;
+      typedef typename _Base::const_reference       const_reference;
 
       typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, list>
 						    iterator;
@@ -60,8 +60,8 @@
 
       typedef _Tp				    value_type;
       typedef _Allocator			    allocator_type;
-      typedef typename _Allocator::pointer          pointer;
-      typedef typename _Allocator::const_pointer    const_pointer;
+      typedef typename _Base::pointer               pointer;
+      typedef typename _Base::const_pointer         const_pointer;
       typedef std::reverse_iterator<iterator>       reverse_iterator;
       typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
 
diff -urN libstdc++-v3-orig/include/debug/map.h libstdc++-v3/include/debug/map.h
--- libstdc++-v3-orig/include/debug/map.h	2004-07-29 12:52:48.000000000 +0200
+++ libstdc++-v3/include/debug/map.h	2005-06-07 03:02:02.000000000 +0200
@@ -1,6 +1,6 @@
 // Debugging map implementation -*- C++ -*-
 
-// Copyright (C) 2003, 2004
+// Copyright (C) 2003, 2004, 2005
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -53,8 +53,8 @@
       typedef std::pair<const _Key, _Tp>            value_type;
       typedef _Compare                              key_compare;
       typedef _Allocator                            allocator_type;
-      typedef typename _Allocator::reference        reference;
-      typedef typename _Allocator::const_reference  const_reference;
+      typedef typename _Base::reference             reference;
+      typedef typename _Base::const_reference       const_reference;
 
       typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, map>
                                                     iterator;
@@ -63,8 +63,8 @@
 
       typedef typename _Base::size_type             size_type;
       typedef typename _Base::difference_type       difference_type;
-      typedef typename _Allocator::pointer          pointer;
-      typedef typename _Allocator::const_pointer    const_pointer;
+      typedef typename _Base::pointer               pointer;
+      typedef typename _Base::const_pointer         const_pointer;
       typedef std::reverse_iterator<iterator>       reverse_iterator;
       typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
 
diff -urN libstdc++-v3-orig/include/debug/multimap.h libstdc++-v3/include/debug/multimap.h
--- libstdc++-v3-orig/include/debug/multimap.h	2004-04-16 21:04:04.000000000 +0200
+++ libstdc++-v3/include/debug/multimap.h	2005-06-07 03:02:16.000000000 +0200
@@ -1,6 +1,6 @@
 // Debugging multimap implementation -*- C++ -*-
 
-// Copyright (C) 2003, 2004
+// Copyright (C) 2003, 2004, 2005
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -53,8 +53,8 @@
       typedef std::pair<const _Key, _Tp>             value_type;
       typedef _Compare                               key_compare;
       typedef _Allocator                             allocator_type;
-      typedef typename _Allocator::reference         reference;
-      typedef typename _Allocator::const_reference   const_reference;
+      typedef typename _Base::reference              reference;
+      typedef typename _Base::const_reference        const_reference;
 
       typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, multimap>
                                                      iterator;
@@ -63,8 +63,8 @@
 
       typedef typename _Base::size_type              size_type;
       typedef typename _Base::difference_type        difference_type;
-      typedef typename _Allocator::pointer           pointer;
-      typedef typename _Allocator::const_pointer     const_pointer;
+      typedef typename _Base::pointer                pointer;
+      typedef typename _Base::const_pointer          const_pointer;
       typedef std::reverse_iterator<iterator>        reverse_iterator;
       typedef std::reverse_iterator<const_iterator>  const_reverse_iterator;
 
diff -urN libstdc++-v3-orig/include/debug/multiset.h libstdc++-v3/include/debug/multiset.h
--- libstdc++-v3-orig/include/debug/multiset.h	2004-04-16 21:04:04.000000000 +0200
+++ libstdc++-v3/include/debug/multiset.h	2005-06-07 03:02:26.000000000 +0200
@@ -1,6 +1,6 @@
 // Debugging multiset implementation -*- C++ -*-
 
-// Copyright (C) 2003, 2004
+// Copyright (C) 2003, 2004, 2005
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -53,8 +53,8 @@
       typedef _Compare				     key_compare;
       typedef _Compare				     value_compare;
       typedef _Allocator			     allocator_type;
-      typedef typename _Allocator::reference	     reference;
-      typedef typename _Allocator::const_reference   const_reference;
+      typedef typename _Base::reference	             reference;
+      typedef typename _Base::const_reference        const_reference;
 
       typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, multiset>
       iterator;
@@ -63,8 +63,8 @@
 
       typedef typename _Base::size_type              size_type;
       typedef typename _Base::difference_type        difference_type;
-      typedef typename _Allocator::pointer           pointer;
-      typedef typename _Allocator::const_pointer     const_pointer;
+      typedef typename _Base::pointer                pointer;
+      typedef typename _Base::const_pointer          const_pointer;
       typedef std::reverse_iterator<iterator>        reverse_iterator;
       typedef std::reverse_iterator<const_iterator>  const_reverse_iterator;
 
diff -urN libstdc++-v3-orig/include/debug/set.h libstdc++-v3/include/debug/set.h
--- libstdc++-v3-orig/include/debug/set.h	2004-04-16 21:04:04.000000000 +0200
+++ libstdc++-v3/include/debug/set.h	2005-06-07 02:56:44.000000000 +0200
@@ -1,6 +1,6 @@
 // Debugging set implementation -*- C++ -*-
 
-// Copyright (C) 2003, 2004
+// Copyright (C) 2003, 2004, 2005
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -53,8 +53,8 @@
       typedef _Compare				    key_compare;
       typedef _Compare				    value_compare;
       typedef _Allocator			    allocator_type;
-      typedef typename _Allocator::reference        reference;
-      typedef typename _Allocator::const_reference  const_reference;
+      typedef typename _Base::reference             reference;
+      typedef typename _Base::const_reference       const_reference;
 
       typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, set>
                                                     iterator;
@@ -63,8 +63,8 @@
 
       typedef typename _Base::size_type             size_type;
       typedef typename _Base::difference_type       difference_type;
-      typedef typename _Allocator::pointer          pointer;
-      typedef typename _Allocator::const_pointer    const_pointer;
+      typedef typename _Base::pointer               pointer;
+      typedef typename _Base::const_pointer         const_pointer;
       typedef std::reverse_iterator<iterator>       reverse_iterator;
       typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
 
diff -urN libstdc++-v3-orig/include/debug/vector libstdc++-v3/include/debug/vector
--- libstdc++-v3-orig/include/debug/vector	2005-05-27 17:01:44.000000000 +0200
+++ libstdc++-v3/include/debug/vector	2005-06-07 02:56:12.000000000 +0200
@@ -64,8 +64,8 @@
 
       typedef _Tp				    value_type;
       typedef _Allocator			    allocator_type;
-      typedef typename _Allocator::pointer          pointer;
-      typedef typename _Allocator::const_pointer    const_pointer;
+      typedef typename _Base::pointer               pointer;
+      typedef typename _Base::const_pointer         const_pointer;
       typedef std::reverse_iterator<iterator>       reverse_iterator;
       typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]