OSDN Git Service

2005-05-09 Paolo Carlini <pcarlini@suse.de>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 May 2005 01:58:19 +0000 (01:58 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 May 2005 01:58:19 +0000 (01:58 +0000)
    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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99499 138bc75d-0d04-0410-961f-82ee72b054a4

18 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/deque.tcc
libstdc++-v3/include/bits/stl_bvector.h
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_multiset.h
libstdc++-v3/include/bits/stl_set.h
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/bits/vector.tcc
libstdc++-v3/include/std/std_bitset.h
libstdc++-v3/testsuite/23_containers/bitset/18604.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/18604.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/18604.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/18604.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/18604.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/18604.cc [new file with mode: 0644]

index 12052da..89bfcbb 100644 (file)
@@ -1,3 +1,25 @@
+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.    
+
 2005-05-09  Mike Stump  <mrs@apple.com>
 
        * configure: Regenerate.
index 0c57bd5..c5440b2 100644 (file)
@@ -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 @@ namespace _GLIBCXX_STD
       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 @@ namespace _GLIBCXX_STD
       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 @@ namespace _GLIBCXX_STD
       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 @@ namespace _GLIBCXX_STD
       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 @@ namespace _GLIBCXX_STD
       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)
index 5e95415..bdd2155 100644 (file)
@@ -106,7 +106,8 @@ namespace _GLIBCXX_STD
     { *_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<typename _Alloc>
     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<typename _Alloc>
     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<typename _Alloc>
     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<typename _Alloc>
     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<typename _Alloc>
     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<typename _Alloc>
     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())
index 27d0304..fdee3d5 100644 (file)
@@ -106,14 +106,14 @@ namespace _GLIBCXX_STD
       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 @@ namespace _GLIBCXX_STD
    *  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 @@ namespace _GLIBCXX_STD
         _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 @@ namespace _GLIBCXX_STD
       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 @@ namespace _GLIBCXX_STD
         _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 @@ namespace _GLIBCXX_STD
       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 @@ namespace _GLIBCXX_STD
                           _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 @@ namespace _GLIBCXX_STD
       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,
index b928e00..ce167ef 100644 (file)
@@ -110,14 +110,14 @@ namespace _GLIBCXX_STD
   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 @@ namespace _GLIBCXX_STD
   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 _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 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 @@ namespace _GLIBCXX_STD
    *  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
index 8535ae5..a0834a7 100644 (file)
@@ -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 @@ namespace _GLIBCXX_STD
    *  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 @@ namespace _GLIBCXX_STD
     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 @@ namespace _GLIBCXX_STD
        *
        *  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 @@ namespace _GLIBCXX_STD
        *
        *  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 @@ namespace _GLIBCXX_STD
        *
        *  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); }
 
index e080f9a..524b236 100644 (file)
@@ -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 @@ namespace _GLIBCXX_STD
   // 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 @@ namespace _GLIBCXX_STD
     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 @@ namespace _GLIBCXX_STD
        *  @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 @@ namespace _GLIBCXX_STD
        *  @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); }
 
index c82dee6..3f42ef4 100644 (file)
@@ -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 @@ namespace _GLIBCXX_STD
 {
 
   // 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 @@ namespace _GLIBCXX_STD
        *
        *  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); }
 
index bb28bdd..1a15d11 100644 (file)
@@ -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 @@ namespace _GLIBCXX_STD
        *
        *  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 @@ namespace _GLIBCXX_STD
        *
        *  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); }
       //@}
index 3495d93..d532c2d 100644 (file)
@@ -144,7 +144,7 @@ namespace _GLIBCXX_STD
    *  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 @@ namespace _GLIBCXX_STD
         _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 @@ namespace _GLIBCXX_STD
       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 @@ namespace _GLIBCXX_STD
       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 @@ namespace _GLIBCXX_STD
         _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 @@ namespace _GLIBCXX_STD
       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 @@ namespace _GLIBCXX_STD
         _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 @@ namespace _GLIBCXX_STD
       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.
index 57144b0..f9f5e5a 100644 (file)
@@ -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 @@ namespace _GLIBCXX_STD
       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 @@ namespace _GLIBCXX_STD
       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 @@ namespace _GLIBCXX_STD
     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 @@ namespace _GLIBCXX_STD
       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)
          {
index dc67778..76be09d 100644 (file)
@@ -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 @@ namespace _GLIBCXX_STD
        */
       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 @@ namespace _GLIBCXX_STD
            __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 @@ namespace _GLIBCXX_STD
        *                                 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 @@ namespace _GLIBCXX_STD
        *  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 @@ namespace _GLIBCXX_STD
       // _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 @@ namespace _GLIBCXX_STD
   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 @@ namespace _GLIBCXX_STD
   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 @@ namespace _GLIBCXX_STD
    *  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 @@ namespace _GLIBCXX_STD
                  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 @@ namespace _GLIBCXX_STD
                      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 @@ namespace _GLIBCXX_STD
     }
 
   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 --git a/libstdc++-v3/testsuite/23_containers/bitset/18604.cc b/libstdc++-v3/testsuite/23_containers/bitset/18604.cc
new file mode 100644 (file)
index 0000000..bc3287a
--- /dev/null
@@ -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 --git a/libstdc++-v3/testsuite/23_containers/deque/18604.cc b/libstdc++-v3/testsuite/23_containers/deque/18604.cc
new file mode 100644 (file)
index 0000000..f9ff1f6
--- /dev/null
@@ -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 --git a/libstdc++-v3/testsuite/23_containers/list/18604.cc b/libstdc++-v3/testsuite/23_containers/list/18604.cc
new file mode 100644 (file)
index 0000000..66519e5
--- /dev/null
@@ -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 --git a/libstdc++-v3/testsuite/23_containers/map/18604.cc b/libstdc++-v3/testsuite/23_containers/map/18604.cc
new file mode 100644 (file)
index 0000000..fb1d3bd
--- /dev/null
@@ -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 --git a/libstdc++-v3/testsuite/23_containers/set/18604.cc b/libstdc++-v3/testsuite/23_containers/set/18604.cc
new file mode 100644 (file)
index 0000000..57a9627
--- /dev/null
@@ -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 --git a/libstdc++-v3/testsuite/23_containers/vector/18604.cc b/libstdc++-v3/testsuite/23_containers/vector/18604.cc
new file mode 100644 (file)
index 0000000..d22ee6f
--- /dev/null
@@ -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>