This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

[Patch] libstdc++/18604


Hi,

the below is what I'm finishing testing (on x86-linux) for this *long
standing* PR. I think the analysis that Giovanni posted today is right
and, in any case, the testcase speaks by itself (thanks!)

If nobody objects, will go in mainline and 4_0. Technically, it's not a
regression - happens only in debug mode - but seems safe for 3_4 too
(probably needs tweaking, would look into that).

Paolo.

//////////////////
2005-05-09  Paolo Carlini  <pcarlini@suse.de>
	    Giovanni Bajo  <giovannibajo@gcc.gnu.org>
	    
	PR libstdc++/18604
	* include/bits/deque.tcc: Fully qualify names from namespace std::
	* include/bits/stl_bvector.h: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_map.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/stl_vector.h: Likewise.
	* include/bits/vector.tcc: Likewise.
	* include/std/std_bitset.h: Likewise.
	* testsuite/23_containers/bitset/18604.cc: New.
	* testsuite/23_containers/deque/18604.cc: Likewise.
	* testsuite/23_containers/list/18604.cc: Likewise.
	* testsuite/23_containers/map/18604.cc: Likewise.
	* testsuite/23_containers/set/18604.cc: Likewise.
	* testsuite/23_containers/vector/18604.cc: Likewise.

	
diff -urN libstdc++-v3-orig/include/bits/deque.tcc libstdc++-v3/include/bits/deque.tcc
--- libstdc++-v3-orig/include/bits/deque.tcc	2004-08-16 01:08:57.000000000 +0200
+++ libstdc++-v3/include/bits/deque.tcc	2005-05-09 19:00:15.000000000 +0200
@@ -1,6 +1,6 @@
 // Deque implementation (out of line) -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -203,7 +203,7 @@
       void
       deque<_Tp, _Alloc>
       ::_M_assign_aux(_InputIterator __first, _InputIterator __last,
-		      input_iterator_tag)
+		      std::input_iterator_tag)
       {
         iterator __cur = begin();
         for (; __first != __last && __cur != end(); ++__cur, ++__first)
@@ -287,7 +287,7 @@
       void
       deque<_Tp, _Alloc>::
       _M_range_initialize(_InputIterator __first, _InputIterator __last,
-                          input_iterator_tag)
+                          std::input_iterator_tag)
       {
         this->_M_initialize_map(0);
         try
@@ -307,7 +307,7 @@
       void
       deque<_Tp, _Alloc>::
       _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
-                          forward_iterator_tag)
+                          std::forward_iterator_tag)
       {
         const size_type __n = std::distance(__first, __last);
         this->_M_initialize_map(__n);
@@ -417,7 +417,7 @@
       deque<_Tp, _Alloc>::
       _M_range_insert_aux(iterator __pos,
                           _InputIterator __first, _InputIterator __last,
-                          input_iterator_tag)
+                          std::input_iterator_tag)
       { std::copy(__first, __last, std::inserter(*this, __pos)); }
 
   template <typename _Tp, typename _Alloc>
@@ -426,7 +426,7 @@
       deque<_Tp, _Alloc>::
       _M_range_insert_aux(iterator __pos,
                           _ForwardIterator __first, _ForwardIterator __last,
-                          forward_iterator_tag)
+                          std::forward_iterator_tag)
       {
         const size_type __n = std::distance(__first, __last);
         if (__pos._M_cur == this->_M_impl._M_start._M_cur)
diff -urN libstdc++-v3-orig/include/bits/stl_bvector.h libstdc++-v3/include/bits/stl_bvector.h
--- libstdc++-v3-orig/include/bits/stl_bvector.h	2005-04-28 09:50:45.000000000 +0200
+++ libstdc++-v3/include/bits/stl_bvector.h	2005-05-09 18:53:34.000000000 +0200
@@ -106,7 +106,8 @@
     { *_M_p ^= _M_mask; }
   };
 
-  struct _Bit_iterator_base : public iterator<random_access_iterator_tag, bool>
+  struct _Bit_iterator_base
+  : public std::iterator<std::random_access_iterator_tag, bool>
   {
     _Bit_type * _M_p;
     unsigned int _M_offset;
@@ -489,7 +490,7 @@
     template<class _InputIterator>
       void
       _M_initialize_range(_InputIterator __first, _InputIterator __last,
-			  input_iterator_tag)
+			  std::input_iterator_tag)
       {
 	this->_M_impl._M_start = iterator();
 	this->_M_impl._M_finish = iterator();
@@ -501,7 +502,7 @@
     template<class _ForwardIterator>
       void
       _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last,
-			  forward_iterator_tag)
+			  std::forward_iterator_tag)
       {
 	const size_type __n = std::distance(__first, __last);
 	_M_initialize(__n);
@@ -511,7 +512,7 @@
     template<class _InputIterator>
       void
       _M_insert_range(iterator __pos, _InputIterator __first, 
-		      _InputIterator __last, input_iterator_tag)
+		      _InputIterator __last, std::input_iterator_tag)
       {
 	for (; __first != __last; ++__first)
 	  {
@@ -523,7 +524,7 @@
     template<class _ForwardIterator>
       void
       _M_insert_range(iterator __position, _ForwardIterator __first, 
-		      _ForwardIterator __last, forward_iterator_tag)
+		      _ForwardIterator __last, std::forward_iterator_tag)
       {
 	if (__first != __last)
 	  {
@@ -746,7 +747,7 @@
     template<class _InputIterator>
       void
       _M_assign_aux(_InputIterator __first, _InputIterator __last,
-		    input_iterator_tag)
+		    std::input_iterator_tag)
       {
 	iterator __cur = begin();
 	for (; __first != __last && __cur != end(); ++__cur, ++__first)
@@ -760,7 +761,7 @@
     template<class _ForwardIterator>
       void
       _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
-		    forward_iterator_tag)
+		    std::forward_iterator_tag)
       {
 	const size_type __len = std::distance(__first, __last);
 	if (__len < size())
diff -urN libstdc++-v3-orig/include/bits/stl_deque.h libstdc++-v3/include/bits/stl_deque.h
--- libstdc++-v3-orig/include/bits/stl_deque.h	2005-01-31 17:21:56.000000000 +0100
+++ libstdc++-v3/include/bits/stl_deque.h	2005-05-09 19:13:45.000000000 +0200
@@ -106,14 +106,14 @@
       static size_t _S_buffer_size()
       { return __deque_buf_size(sizeof(_Tp)); }
 
-      typedef random_access_iterator_tag iterator_category;
-      typedef _Tp                        value_type;
-      typedef _Ptr                       pointer;
-      typedef _Ref                       reference;
-      typedef size_t                     size_type;
-      typedef ptrdiff_t                  difference_type;
-      typedef _Tp**                      _Map_pointer;
-      typedef _Deque_iterator            _Self;
+      typedef std::random_access_iterator_tag iterator_category;
+      typedef _Tp                             value_type;
+      typedef _Ptr                            pointer;
+      typedef _Ref                            reference;
+      typedef size_t                          size_type;
+      typedef ptrdiff_t                       difference_type;
+      typedef _Tp**                           _Map_pointer;
+      typedef _Deque_iterator                 _Self;
 
       _Tp* _M_cur;
       _Tp* _M_first;
@@ -591,7 +591,7 @@
    *  and we can use other standard algorithms as well.
    *  @endif
   */
-  template<typename _Tp, typename _Alloc = allocator<_Tp> >
+  template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
     class deque : protected _Deque_base<_Tp, _Alloc>
     {
       // concept requirements
@@ -1214,8 +1214,8 @@
         _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
 			       __false_type)
         {
-	  typedef typename iterator_traits<_InputIterator>::iterator_category
-	    _IterCategory;
+	  typedef typename std::iterator_traits<_InputIterator>::
+	    iterator_category _IterCategory;
 	  _M_range_initialize(__first, __last, _IterCategory());
 	}
 
@@ -1236,13 +1236,13 @@
       template<typename _InputIterator>
         void
         _M_range_initialize(_InputIterator __first, _InputIterator __last,
-			    input_iterator_tag);
+			    std::input_iterator_tag);
 
       // called by the second initialize_dispatch above
       template<typename _ForwardIterator>
         void
         _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
-			    forward_iterator_tag);
+			    std::forward_iterator_tag);
       //@}
 
       /**
@@ -1278,8 +1278,8 @@
         _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
 			   __false_type)
         {
-	  typedef typename iterator_traits<_InputIterator>::iterator_category
-	    _IterCategory;
+	  typedef typename std::iterator_traits<_InputIterator>::
+	    iterator_category _IterCategory;
 	  _M_assign_aux(__first, __last, _IterCategory());
 	}
 
@@ -1287,13 +1287,13 @@
       template<typename _InputIterator>
         void
         _M_assign_aux(_InputIterator __first, _InputIterator __last,
-		      input_iterator_tag);
+		      std::input_iterator_tag);
 
       // called by the second assign_dispatch above
       template<typename _ForwardIterator>
         void
         _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
-		      forward_iterator_tag)
+		      std::forward_iterator_tag)
         {
 	  const size_type __len = std::distance(__first, __last);
 	  if (__len > size())
@@ -1356,8 +1356,8 @@
 			   _InputIterator __first, _InputIterator __last,
 			   __false_type)
         {
-	  typedef typename iterator_traits<_InputIterator>::iterator_category
-	    _IterCategory;
+	  typedef typename std::iterator_traits<_InputIterator>::
+	    iterator_category _IterCategory;
           _M_range_insert_aux(__pos, __first, __last, _IterCategory());
 	}
 
@@ -1365,13 +1365,13 @@
       template<typename _InputIterator>
         void
         _M_range_insert_aux(iterator __pos, _InputIterator __first,
-			    _InputIterator __last, input_iterator_tag);
+			    _InputIterator __last, std::input_iterator_tag);
 
       // called by the second insert_dispatch above
       template<typename _ForwardIterator>
         void
         _M_range_insert_aux(iterator __pos, _ForwardIterator __first,
-			    _ForwardIterator __last, forward_iterator_tag);
+			    _ForwardIterator __last, std::forward_iterator_tag);
 
       // Called by insert(p,n,x), and the range insert when it turns out to be
       // the same thing.  Can use fill functions in optimal situations,
diff -urN libstdc++-v3-orig/include/bits/stl_list.h libstdc++-v3/include/bits/stl_list.h
--- libstdc++-v3-orig/include/bits/stl_list.h	2005-01-31 17:21:58.000000000 +0100
+++ libstdc++-v3/include/bits/stl_list.h	2005-05-09 18:58:39.000000000 +0200
@@ -110,14 +110,14 @@
   template<typename _Tp>
     struct _List_iterator
     {
-      typedef _List_iterator<_Tp>           _Self;
-      typedef _List_node<_Tp>               _Node;
+      typedef _List_iterator<_Tp>                _Self;
+      typedef _List_node<_Tp>                    _Node;
 
-      typedef ptrdiff_t                     difference_type;
-      typedef bidirectional_iterator_tag    iterator_category;
-      typedef _Tp                           value_type;
-      typedef _Tp*                          pointer;
-      typedef _Tp&                          reference;
+      typedef ptrdiff_t                          difference_type;
+      typedef std::bidirectional_iterator_tag    iterator_category;
+      typedef _Tp                                value_type;
+      typedef _Tp*                               pointer;
+      typedef _Tp&                               reference;
 
       _List_iterator()
       : _M_node() { }
@@ -186,15 +186,15 @@
   template<typename _Tp>
     struct _List_const_iterator
     {
-      typedef _List_const_iterator<_Tp>     _Self;
-      typedef const _List_node<_Tp>         _Node;
-      typedef _List_iterator<_Tp>           iterator;
-
-      typedef ptrdiff_t                     difference_type;
-      typedef bidirectional_iterator_tag    iterator_category;
-      typedef _Tp                           value_type;
-      typedef const _Tp*                    pointer;
-      typedef const _Tp&                    reference;
+      typedef _List_const_iterator<_Tp>          _Self;
+      typedef const _List_node<_Tp>              _Node;
+      typedef _List_iterator<_Tp>                iterator;
+
+      typedef ptrdiff_t                          difference_type;
+      typedef std::bidirectional_iterator_tag    iterator_category;
+      typedef _Tp                                value_type;
+      typedef const _Tp*                         pointer;
+      typedef const _Tp&                         reference;
 
       _List_const_iterator()
       : _M_node() { }
@@ -387,7 +387,7 @@
    *  iterator's next/previous pointers refer to itself, the %list is
    *  %empty.  @endif
   */
-  template<typename _Tp, typename _Alloc = allocator<_Tp> >
+  template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
     class list : protected _List_base<_Tp, _Alloc>
     {
       // concept requirements
diff -urN libstdc++-v3-orig/include/bits/stl_map.h libstdc++-v3/include/bits/stl_map.h
--- libstdc++-v3-orig/include/bits/stl_map.h	2004-06-09 23:37:46.000000000 +0200
+++ libstdc++-v3/include/bits/stl_map.h	2005-05-09 19:08:00.000000000 +0200
@@ -1,6 +1,6 @@
 // Map implementation -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -86,8 +86,8 @@
    *  called (*_unique versus *_equal, same as the standard).
    *  @endif
   */
-  template <typename _Key, typename _Tp, typename _Compare = less<_Key>,
-            typename _Alloc = allocator<pair<const _Key, _Tp> > >
+  template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
+            typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
     class map
     {
       // concept requirements
@@ -98,11 +98,11 @@
     public:
       typedef _Key                                          key_type;
       typedef _Tp                                           mapped_type;
-      typedef pair<const _Key, _Tp>                         value_type;
+      typedef std::pair<const _Key, _Tp>                    value_type;
       typedef _Compare                                      key_compare;
 
       class value_compare
-      : public binary_function<value_type, value_type, bool>
+      : public std::binary_function<value_type, value_type, bool>
       {
 	friend class map<_Key,_Tp,_Compare,_Alloc>;
       protected:
@@ -355,7 +355,7 @@
        *
        *  Insertion requires logarithmic time.
        */
-      pair<iterator,bool>
+      std::pair<iterator,bool>
       insert(const value_type& __x)
       { return _M_t.insert_unique(__x); }
 
@@ -589,7 +589,7 @@
        *
        *  This function probably only makes sense for multimaps.
        */
-      pair<iterator,iterator>
+      std::pair<iterator,iterator>
       equal_range(const key_type& __x)
       { return _M_t.equal_range(__x); }
 
@@ -608,7 +608,7 @@
        *
        *  This function probably only makes sense for multimaps.
        */
-      pair<const_iterator,const_iterator>
+      std::pair<const_iterator,const_iterator>
       equal_range(const key_type& __x) const
       { return _M_t.equal_range(__x); }
 
diff -urN libstdc++-v3-orig/include/bits/stl_multimap.h libstdc++-v3/include/bits/stl_multimap.h
--- libstdc++-v3-orig/include/bits/stl_multimap.h	2004-06-09 23:37:46.000000000 +0200
+++ libstdc++-v3/include/bits/stl_multimap.h	2005-05-09 19:08:29.000000000 +0200
@@ -1,6 +1,6 @@
 // Multimap implementation -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -68,8 +68,8 @@
   // Forward declaration of operators < and ==, needed for friend declaration.
 
   template <typename _Key, typename _Tp,
-            typename _Compare = less<_Key>,
-            typename _Alloc = allocator<pair<const _Key, _Tp> > >
+            typename _Compare = std::less<_Key>,
+            typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
     class multimap;
 
   template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
@@ -114,11 +114,11 @@
     public:
       typedef _Key                                          key_type;
       typedef _Tp                                           mapped_type;
-      typedef pair<const _Key, _Tp>                         value_type;
+      typedef std::pair<const _Key, _Tp>                    value_type;
       typedef _Compare                                      key_compare;
 
       class value_compare
-      : public binary_function<value_type, value_type, bool>
+      : public std::binary_function<value_type, value_type, bool>
       {
 	friend class multimap<_Key,_Tp,_Compare,_Alloc>;
       protected:
@@ -573,7 +573,7 @@
        *  @endcode
        *  (but is faster than making the calls separately).
        */
-      pair<iterator,iterator>
+      std::pair<iterator,iterator>
       equal_range(const key_type& __x)
       { return _M_t.equal_range(__x); }
 
@@ -590,7 +590,7 @@
        *  @endcode
        *  (but is faster than making the calls separately).
        */
-      pair<const_iterator,const_iterator>
+      std::pair<const_iterator,const_iterator>
       equal_range(const key_type& __x) const
       { return _M_t.equal_range(__x); }
 
diff -urN libstdc++-v3-orig/include/bits/stl_multiset.h libstdc++-v3/include/bits/stl_multiset.h
--- libstdc++-v3-orig/include/bits/stl_multiset.h	2004-04-16 21:04:03.000000000 +0200
+++ libstdc++-v3/include/bits/stl_multiset.h	2005-05-09 18:03:02.000000000 +0200
@@ -1,6 +1,6 @@
 // Multiset implementation -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -67,8 +67,8 @@
 {
 
   // Forward declaration of operators < and ==, needed for friend declaration.
-  template <class _Key, class _Compare = less<_Key>,
-	    class _Alloc = allocator<_Key> >
+  template <class _Key, class _Compare = std::less<_Key>,
+	    class _Alloc = std::allocator<_Key> >
     class multiset;
 
   template <class _Key, class _Compare, class _Alloc>
@@ -492,11 +492,11 @@
        *
        *  This function probably only makes sense for multisets.
        */
-      pair<iterator,iterator>
+      std::pair<iterator,iterator>
       equal_range(const key_type& __x)
       { return _M_t.equal_range(__x); }
 
-      pair<const_iterator,const_iterator>
+      std::pair<const_iterator,const_iterator>
       equal_range(const key_type& __x) const
       { return _M_t.equal_range(__x); }
 
diff -urN libstdc++-v3-orig/include/bits/stl_set.h libstdc++-v3/include/bits/stl_set.h
--- libstdc++-v3-orig/include/bits/stl_set.h	2004-04-16 21:04:03.000000000 +0200
+++ libstdc++-v3/include/bits/stl_set.h	2005-05-09 18:04:17.000000000 +0200
@@ -1,6 +1,6 @@
 // Set implementation -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -66,8 +66,8 @@
 namespace _GLIBCXX_STD
 {
   // Forward declarations of operators < and ==, needed for friend declaration.
-  template<class _Key, class _Compare = less<_Key>,
-	   class _Alloc = allocator<_Key> >
+  template<class _Key, class _Compare = std::less<_Key>,
+	   class _Alloc = std::allocator<_Key> >
     class set;
 
   template<class _Key, class _Compare, class _Alloc>
@@ -308,11 +308,12 @@
        *
        *  Insertion requires logarithmic time.
        */
-      pair<iterator,bool>
+      std::pair<iterator,bool>
       insert(const value_type& __x)
       {
-	pair<typename _Rep_type::iterator, bool> __p = _M_t.insert_unique(__x);
-	return pair<iterator, bool>(__p.first, __p.second);
+	std::pair<typename _Rep_type::iterator, bool> __p =
+	  _M_t.insert_unique(__x);
+	return std::pair<iterator, bool>(__p.first, __p.second);
       }
 
       /**
@@ -502,11 +503,11 @@
        *
        *  This function probably only makes sense for multisets.
        */
-      pair<iterator,iterator>
+      std::pair<iterator,iterator>
       equal_range(const key_type& __x)
       { return _M_t.equal_range(__x); }
 
-      pair<const_iterator,const_iterator>
+      std::pair<const_iterator,const_iterator>
       equal_range(const key_type& __x) const
       { return _M_t.equal_range(__x); }
       //@}
diff -urN libstdc++-v3-orig/include/bits/stl_vector.h libstdc++-v3/include/bits/stl_vector.h
--- libstdc++-v3-orig/include/bits/stl_vector.h	2005-01-31 17:21:59.000000000 +0100
+++ libstdc++-v3/include/bits/stl_vector.h	2005-05-09 19:14:36.000000000 +0200
@@ -144,7 +144,7 @@
    *  memory and size allocation.  Subscripting ( @c [] ) access is
    *  also provided as with C-style arrays.
   */
-  template<typename _Tp, typename _Alloc = allocator<_Tp> >
+  template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
     class vector : protected _Vector_base<_Tp, _Alloc>
     {
       // Concept requirements.
@@ -795,8 +795,8 @@
         _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
 			       __false_type)
         {
-	  typedef typename iterator_traits<_InputIterator>::iterator_category
-	    _IterCategory;
+	  typedef typename std::iterator_traits<_InputIterator>::
+	    iterator_category _IterCategory;
 	  _M_range_initialize(__first, __last, _IterCategory());
 	}
 
@@ -804,7 +804,7 @@
       template<typename _InputIterator>
         void
         _M_range_initialize(_InputIterator __first,
-			    _InputIterator __last, input_iterator_tag)
+			    _InputIterator __last, std::input_iterator_tag)
         {
 	  for (; __first != __last; ++__first)
 	    push_back(*__first);
@@ -814,7 +814,7 @@
       template<typename _ForwardIterator>
         void
         _M_range_initialize(_ForwardIterator __first,
-			    _ForwardIterator __last, forward_iterator_tag)
+			    _ForwardIterator __last, std::forward_iterator_tag)
         {
 	  const size_type __n = std::distance(__first, __last);
 	  this->_M_impl._M_start = this->_M_allocate(__n);
@@ -844,8 +844,8 @@
         _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
 			   __false_type)
         {
-	  typedef typename iterator_traits<_InputIterator>::iterator_category
-	    _IterCategory;
+	  typedef typename std::iterator_traits<_InputIterator>::
+	    iterator_category _IterCategory;
 	  _M_assign_aux(__first, __last, _IterCategory());
 	}
 
@@ -853,13 +853,13 @@
       template<typename _InputIterator>
         void
         _M_assign_aux(_InputIterator __first, _InputIterator __last,
-		      input_iterator_tag);
+		      std::input_iterator_tag);
 
       // Called by the second assign_dispatch above
       template<typename _ForwardIterator>
         void
         _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
-		      forward_iterator_tag);
+		      std::forward_iterator_tag);
 
       // Called by assign(n,t), and the range assign when it turns out
       // to be the same thing.
@@ -885,8 +885,8 @@
         _M_insert_dispatch(iterator __pos, _InputIterator __first,
 			   _InputIterator __last, __false_type)
         {
-	  typedef typename iterator_traits<_InputIterator>::iterator_category
-	    _IterCategory;
+	  typedef typename std::iterator_traits<_InputIterator>::
+	    iterator_category _IterCategory;
 	  _M_range_insert(__pos, __first, __last, _IterCategory());
 	}
 
@@ -894,13 +894,13 @@
       template<typename _InputIterator>
         void
         _M_range_insert(iterator __pos, _InputIterator __first,
-			_InputIterator __last, input_iterator_tag);
+			_InputIterator __last, std::input_iterator_tag);
 
       // Called by the second insert_dispatch above
       template<typename _ForwardIterator>
         void
         _M_range_insert(iterator __pos, _ForwardIterator __first,
-			_ForwardIterator __last, forward_iterator_tag);
+			_ForwardIterator __last, std::forward_iterator_tag);
 
       // Called by insert(p,n,x), and the range insert when it turns out to be
       // the same thing.
diff -urN libstdc++-v3-orig/include/bits/vector.tcc libstdc++-v3/include/bits/vector.tcc
--- libstdc++-v3-orig/include/bits/vector.tcc	2004-12-30 03:32:04.000000000 +0100
+++ libstdc++-v3/include/bits/vector.tcc	2005-05-09 19:01:45.000000000 +0200
@@ -1,6 +1,6 @@
 // Vector implementation (out of line) -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -192,7 +192,7 @@
       void
       vector<_Tp, _Alloc>::
       _M_assign_aux(_InputIterator __first, _InputIterator __last,
-		    input_iterator_tag)
+		    std::input_iterator_tag)
       {
 	iterator __cur(begin());
 	for (; __first != __last && __cur != end(); ++__cur, ++__first)
@@ -208,7 +208,7 @@
       void
       vector<_Tp, _Alloc>::
       _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
-		    forward_iterator_tag)
+		    std::forward_iterator_tag)
       {
 	const size_type __len = std::distance(__first, __last);
 
@@ -392,7 +392,7 @@
     void
     vector<_Tp, _Alloc>::
     _M_range_insert(iterator __pos, _InputIterator __first,
-		    _InputIterator __last, input_iterator_tag)
+		    _InputIterator __last, std::input_iterator_tag)
     {
       for (; __first != __last; ++__first)
 	{
@@ -406,7 +406,7 @@
       void
       vector<_Tp, _Alloc>::
       _M_range_insert(iterator __position, _ForwardIterator __first,
-		      _ForwardIterator __last, forward_iterator_tag)
+		      _ForwardIterator __last, std::forward_iterator_tag)
       {
 	if (__first != __last)
 	  {
diff -urN libstdc++-v3-orig/include/std/std_bitset.h libstdc++-v3/include/std/std_bitset.h
--- libstdc++-v3-orig/include/std/std_bitset.h	2004-11-24 05:11:14.000000000 +0100
+++ libstdc++-v3/include/std/std_bitset.h	2005-05-09 18:43:19.000000000 +0200
@@ -1,6 +1,6 @@
 // <bitset> -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -751,7 +751,7 @@
        */
       template<class _CharT, class _Traits, class _Alloc>
 	explicit
-	bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
+	bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
 	       size_t __position = 0)
 	: _Base()
 	{
@@ -759,7 +759,7 @@
 	    __throw_out_of_range(__N("bitset::bitset initial position "
 				     "not valid"));
 	  _M_copy_from_string(__s, __position,
-			      basic_string<_CharT, _Traits, _Alloc>::npos);
+			      std::basic_string<_CharT, _Traits, _Alloc>::npos);
 	}
 
       /**
@@ -772,7 +772,7 @@
        *                                 which is neither '0' nor '1'.
        */
       template<class _CharT, class _Traits, class _Alloc>
-	bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
+	bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
 	       size_t __position, size_t __n)
 	: _Base()
 	{
@@ -1014,10 +1014,10 @@
        *  an example).
        */
       template<class _CharT, class _Traits, class _Alloc>
-	basic_string<_CharT, _Traits, _Alloc>
+	std::basic_string<_CharT, _Traits, _Alloc>
 	to_string() const
 	{
-	  basic_string<_CharT, _Traits, _Alloc> __result;
+	  std::basic_string<_CharT, _Traits, _Alloc> __result;
 	  _M_copy_to_string(__result);
 	  return __result;
 	}
@@ -1025,28 +1025,36 @@
       // _GLIBCXX_RESOLVE_LIB_DEFECTS
       // 434. bitset::to_string() hard to use.
       template<class _CharT, class _Traits>
-	basic_string<_CharT, _Traits, allocator<_CharT> >
+	std::basic_string<_CharT, _Traits, std::allocator<_CharT> >
 	to_string() const
-	{ return to_string<_CharT, _Traits, allocator<_CharT> >(); }
+	{ return to_string<_CharT, _Traits, std::allocator<_CharT> >(); }
 
       template<class _CharT>
-	basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >
+	std::basic_string<_CharT, std::char_traits<_CharT>,
+	                  std::allocator<_CharT> >
 	to_string() const
-	{ return to_string<_CharT, char_traits<_CharT>, allocator<_CharT> >(); }
+	{
+	  return to_string<_CharT, std::char_traits<_CharT>,
+	                   std::allocator<_CharT> >();
+	}
 
-      basic_string<char, char_traits<char>, allocator<char> >
+      std::basic_string<char, std::char_traits<char>, std::allocator<char> >
       to_string() const
-      { return to_string<char, char_traits<char>, allocator<char> >(); }
+      {
+	return to_string<char, std::char_traits<char>,
+	                 std::allocator<char> >();
+      }
 
       // Helper functions for string operations.
       template<class _CharT, class _Traits, class _Alloc>
 	void
-	_M_copy_from_string(const basic_string<_CharT, _Traits, _Alloc>& __s,
+	_M_copy_from_string(const std::basic_string<_CharT,
+			    _Traits, _Alloc>& __s,
 			    size_t, size_t);
 
       template<class _CharT, class _Traits, class _Alloc>
 	void
-	_M_copy_to_string(basic_string<_CharT, _Traits, _Alloc>&) const;
+	_M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>&) const;
 
       /// Returns the number of bits which are set.
       size_t
@@ -1136,7 +1144,7 @@
   template<size_t _Nb>
     template<class _CharT, class _Traits, class _Alloc>
       void
-      bitset<_Nb>::_M_copy_from_string(const basic_string<_CharT, _Traits,
+      bitset<_Nb>::_M_copy_from_string(const std::basic_string<_CharT, _Traits,
 				       _Alloc>& __s, size_t __pos, size_t __n)
       {
 	reset();
@@ -1159,7 +1167,7 @@
   template<size_t _Nb>
     template<class _CharT, class _Traits, class _Alloc>
       void
-      bitset<_Nb>::_M_copy_to_string(basic_string<_CharT, _Traits,
+      bitset<_Nb>::_M_copy_to_string(std::basic_string<_CharT, _Traits,
 				     _Alloc>& __s) const
       {
 	__s.assign(_Nb, '0');
@@ -1216,15 +1224,15 @@
    *  hold.
   */
   template<class _CharT, class _Traits, size_t _Nb>
-    basic_istream<_CharT, _Traits>&
-    operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
+    std::basic_istream<_CharT, _Traits>&
+    operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
     {
       typedef typename _Traits::char_type char_type;
-      basic_string<_CharT, _Traits> __tmp;
+      std::basic_string<_CharT, _Traits> __tmp;
       __tmp.reserve(_Nb);
 
-      ios_base::iostate __state = ios_base::goodbit;
-      typename basic_istream<_CharT, _Traits>::sentry __sentry(__is);
+      std::ios_base::iostate __state = std::ios_base::goodbit;
+      typename std::basic_istream<_CharT, _Traits>::sentry __sentry(__is);
       if (__sentry)
 	{
 	  try
@@ -1241,7 +1249,7 @@
 		  typename _Traits::int_type __c1 = __buf->sbumpc();
 		  if (_Traits::eq_int_type(__c1, __eof))
 		    {
-		      __state |= ios_base::eofbit;
+		      __state |= std::ios_base::eofbit;
 		      break;
 		    }
 		  else
@@ -1254,18 +1262,18 @@
 		      else if (_Traits::eq_int_type(__buf->sputbackc(__c2),
 						    __eof))
 			{
-			  __state |= ios_base::failbit;
+			  __state |= std::ios_base::failbit;
 			  break;
 			}
 		    }
 		}
 	    }
 	  catch(...)
-	    { __is._M_setstate(ios_base::badbit); }
+	    { __is._M_setstate(std::ios_base::badbit); }
 	}
 
       if (__tmp.empty() && _Nb)
-	__state |= ios_base::failbit;
+	__state |= std::ios_base::failbit;
       else
 	__x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb);
       if (__state)
@@ -1274,10 +1282,11 @@
     }
 
   template <class _CharT, class _Traits, size_t _Nb>
-    basic_ostream<_CharT, _Traits>&
-    operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x)
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const bitset<_Nb>& __x)
     {
-      basic_string<_CharT, _Traits> __tmp;
+      std::basic_string<_CharT, _Traits> __tmp;
       __x._M_copy_to_string(__tmp);
       return __os << __tmp;
     }
diff -urN libstdc++-v3-orig/testsuite/23_containers/bitset/18604.cc libstdc++-v3/testsuite/23_containers/bitset/18604.cc
--- libstdc++-v3-orig/testsuite/23_containers/bitset/18604.cc	1970-01-01 01:00:00.000000000 +0100
+++ libstdc++-v3/testsuite/23_containers/bitset/18604.cc	2005-05-09 19:22:20.000000000 +0200
@@ -0,0 +1,41 @@
+// 2005-05-09  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// { dg-options "-D_GLIBCXX_DEBUG" }
+// { dg-do compile }
+
+// libstdc++/18604
+struct less;
+struct allocator;
+struct pair;
+struct binary_function;
+struct iterator;
+struct iterator_traits;
+struct bidirectional_iterator_tag;
+struct forward_iterator_tag;
+struct input_iterator_tag;
+struct random_access_iterator_tag;
+struct ios_base;
+struct basic_string;
+struct basic_istream;
+struct basic_ostream;
+struct char_traits;
+
+#include <bitset>
diff -urN libstdc++-v3-orig/testsuite/23_containers/deque/18604.cc libstdc++-v3/testsuite/23_containers/deque/18604.cc
--- libstdc++-v3-orig/testsuite/23_containers/deque/18604.cc	1970-01-01 01:00:00.000000000 +0100
+++ libstdc++-v3/testsuite/23_containers/deque/18604.cc	2005-05-09 19:22:35.000000000 +0200
@@ -0,0 +1,41 @@
+// 2005-05-09  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// { dg-options "-D_GLIBCXX_DEBUG" }
+// { dg-do compile }
+
+// libstdc++/18604
+struct less;
+struct allocator;
+struct pair;
+struct binary_function;
+struct iterator;
+struct iterator_traits;
+struct bidirectional_iterator_tag;
+struct forward_iterator_tag;
+struct input_iterator_tag;
+struct random_access_iterator_tag;
+struct ios_base;
+struct basic_string;
+struct basic_istream;
+struct basic_ostream;
+struct char_traits;
+
+#include <deque>
diff -urN libstdc++-v3-orig/testsuite/23_containers/list/18604.cc libstdc++-v3/testsuite/23_containers/list/18604.cc
--- libstdc++-v3-orig/testsuite/23_containers/list/18604.cc	1970-01-01 01:00:00.000000000 +0100
+++ libstdc++-v3/testsuite/23_containers/list/18604.cc	2005-05-09 19:22:54.000000000 +0200
@@ -0,0 +1,41 @@
+// 2005-05-09  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// { dg-options "-D_GLIBCXX_DEBUG" }
+// { dg-do compile }
+
+// libstdc++/18604
+struct less;
+struct allocator;
+struct pair;
+struct binary_function;
+struct iterator;
+struct iterator_traits;
+struct bidirectional_iterator_tag;
+struct forward_iterator_tag;
+struct input_iterator_tag;
+struct random_access_iterator_tag;
+struct ios_base;
+struct basic_string;
+struct basic_istream;
+struct basic_ostream;
+struct char_traits;
+
+#include <list>
diff -urN libstdc++-v3-orig/testsuite/23_containers/map/18604.cc libstdc++-v3/testsuite/23_containers/map/18604.cc
--- libstdc++-v3-orig/testsuite/23_containers/map/18604.cc	1970-01-01 01:00:00.000000000 +0100
+++ libstdc++-v3/testsuite/23_containers/map/18604.cc	2005-05-09 19:23:12.000000000 +0200
@@ -0,0 +1,41 @@
+// 2005-05-09  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// { dg-options "-D_GLIBCXX_DEBUG" }
+// { dg-do compile }
+
+// libstdc++/18604
+struct less;
+struct allocator;
+struct pair;
+struct binary_function;
+struct iterator;
+struct iterator_traits;
+struct bidirectional_iterator_tag;
+struct forward_iterator_tag;
+struct input_iterator_tag;
+struct random_access_iterator_tag;
+struct ios_base;
+struct basic_string;
+struct basic_istream;
+struct basic_ostream;
+struct char_traits;
+
+#include <map>
diff -urN libstdc++-v3-orig/testsuite/23_containers/set/18604.cc libstdc++-v3/testsuite/23_containers/set/18604.cc
--- libstdc++-v3-orig/testsuite/23_containers/set/18604.cc	1970-01-01 01:00:00.000000000 +0100
+++ libstdc++-v3/testsuite/23_containers/set/18604.cc	2005-05-09 19:23:27.000000000 +0200
@@ -0,0 +1,42 @@
+// 2005-05-09  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// { dg-options "-D_GLIBCXX_DEBUG" }
+// { dg-do compile }
+
+// libstdc++/18604
+struct less;
+struct allocator;
+struct pair;
+struct binary_function;
+struct iterator;
+struct iterator_traits;
+struct bidirectional_iterator_tag;
+struct forward_iterator_tag;
+struct input_iterator_tag;
+struct random_access_iterator_tag;
+struct ios_base;
+struct basic_string;
+struct basic_istream;
+struct basic_ostream;
+struct char_traits;
+
+#include <set>
+
diff -urN libstdc++-v3-orig/testsuite/23_containers/vector/18604.cc libstdc++-v3/testsuite/23_containers/vector/18604.cc
--- libstdc++-v3-orig/testsuite/23_containers/vector/18604.cc	1970-01-01 01:00:00.000000000 +0100
+++ libstdc++-v3/testsuite/23_containers/vector/18604.cc	2005-05-09 19:23:39.000000000 +0200
@@ -0,0 +1,41 @@
+// 2005-05-09  Paolo Carlini  <pcarlini@suse.de>
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// { dg-options "-D_GLIBCXX_DEBUG" }
+// { dg-do compile }
+
+// libstdc++/18604
+struct less;
+struct allocator;
+struct pair;
+struct binary_function;
+struct iterator;
+struct iterator_traits;
+struct bidirectional_iterator_tag;
+struct forward_iterator_tag;
+struct input_iterator_tag;
+struct random_access_iterator_tag;
+struct ios_base;
+struct basic_string;
+struct basic_istream;
+struct basic_ostream;
+struct char_traits;
+
+#include <vector>

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