]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
stl_list.h: Fully qualify standard functions with std::, thus avoiding Koenig lookup.
authorPaolo Carlini <pcarlini@unitus.it>
Fri, 4 Jul 2003 12:10:13 +0000 (14:10 +0200)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 4 Jul 2003 12:10:13 +0000 (12:10 +0000)
2003-07-04  Paolo Carlini  <pcarlini@unitus.it>

* include/bits/stl_list.h: Fully qualify standard
functions with std::, thus avoiding Koenig lookup.
* include/bits/stl_queue.h: Likewise.
* include/bits/stl_raw_storage_iter.h: Likewise.
* include/bits/stl_tempbuf.h: Likewise.
* include/bits/stl_tree.h: Likewise.
* include/bits/stl_uninitialized.h: Likewise.
* include/bits/stl_vector.h: Likewise.
* include/ext/rope: Change includes order.

From-SVN: r68919

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/include/bits/stl_queue.h
libstdc++-v3/include/bits/stl_raw_storage_iter.h
libstdc++-v3/include/bits/stl_tempbuf.h
libstdc++-v3/include/bits/stl_tree.h
libstdc++-v3/include/bits/stl_uninitialized.h
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/ext/rope

index 509c0ed19f33251622ce9920de558aa3ef308521..f5a7826c3d8bed7444299bdcee2393897c2bd3ea 100644 (file)
@@ -1,3 +1,15 @@
+2003-07-04  Paolo Carlini  <pcarlini@unitus.it>
+
+       * include/bits/stl_list.h: Fully qualify standard
+       functions with std::, thus avoiding Koenig lookup.
+       * include/bits/stl_queue.h: Likewise.
+       * include/bits/stl_raw_storage_iter.h: Likewise.
+       * include/bits/stl_tempbuf.h: Likewise.
+       * include/bits/stl_tree.h: Likewise.
+       * include/bits/stl_uninitialized.h: Likewise.
+       * include/bits/stl_vector.h: Likewise.
+       * include/ext/rope: Change includes order.      
+
 2003-07-04  Benjamin Kosnik  <bkoz@redhat.com>
 
        * configure.host (fpos_include_dir): Fix.
index 46d9e7b6bdaa9745ec961e189de8566ecb055a6a..0fa7cd23a7b2d921bd350097bc6096374fee6965 100644 (file)
@@ -410,7 +410,7 @@ namespace std
     {
       _Node* __p = _M_get_node();
       try {
-        _Construct(&__p->_M_data, __x);
+        std::_Construct(&__p->_M_data, __x);
       }
       catch(...)
       {
@@ -431,7 +431,7 @@ namespace std
     {
       _Node* __p = _M_get_node();
       try {
-        _Construct(&__p->_M_data);
+        std::_Construct(&__p->_M_data);
       }
       catch(...)
       {
@@ -1073,8 +1073,8 @@ namespace std
     inline bool
     operator<(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
     {
-      return lexicographical_compare(__x.begin(), __x.end(),
-                                     __y.begin(), __y.end());
+      return std::lexicographical_compare(__x.begin(), __x.end(),
+                                         __y.begin(), __y.end());
     }
   
   /// Based on operator==
index c69b7ee0557dce3112ca93d6d8880267b3cec1c2..38c378c877334996e6c4a1f2df494d497420f473 100644 (file)
@@ -1,6 +1,6 @@
 // Queue implementation -*- C++ -*-
 
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 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
@@ -332,7 +332,7 @@ namespace std
     priority_queue(const _Compare& __x = _Compare(),
                    const _Sequence& __s = _Sequence()) 
     : c(__s), comp(__x) 
-    { make_heap(c.begin(), c.end(), comp); }
+    { std::make_heap(c.begin(), c.end(), comp); }
   
     /**
      *  @brief  Builds a %queue from a range.
@@ -355,7 +355,7 @@ namespace std
       : c(__s), comp(__x)
       { 
         c.insert(c.end(), __first, __last);
-        make_heap(c.begin(), c.end(), comp);
+        std::make_heap(c.begin(), c.end(), comp);
       }
   
     /**
@@ -389,7 +389,7 @@ namespace std
       try 
         {
           c.push_back(__x); 
-          push_heap(c.begin(), c.end(), comp);
+          std::push_heap(c.begin(), c.end(), comp);
         }
       catch(...)
         {
@@ -413,7 +413,7 @@ namespace std
     {
       try 
         {
-          pop_heap(c.begin(), c.end(), comp);
+          std::pop_heap(c.begin(), c.end(), comp);
           c.pop_back();
         }
       catch(...)
index 59aa004296e8815e70e70c11980c6f664eaf87d3..c4ff66963c542a4d25970d1f31b145033ecccb41 100644 (file)
@@ -84,7 +84,7 @@ namespace std
       raw_storage_iterator& 
       operator=(const _Tp& __element) 
       {
-       _Construct(&*_M_iter, __element);
+       std::_Construct(&*_M_iter, __element);
        return *this;
       }        
 
index 000e64a661a3b7a91daac33e8ef70d762e10a1e9..4f90402fea24919b4a00c79679a39fb1c657129f 100644 (file)
@@ -99,7 +99,7 @@ template <class _ForwardIterator, class _Tp>
 
   void _M_initialize_buffer(const _Tp&, __true_type) {}
   void _M_initialize_buffer(const _Tp& val, __false_type) {
-    uninitialized_fill_n(_M_buffer, _M_len, val);
+    std::uninitialized_fill_n(_M_buffer, _M_len, val);
   }
 
 public:
@@ -133,7 +133,7 @@ public:
   }
  
   ~_Temporary_buffer() {  
-    _Destroy(_M_buffer, _M_buffer + _M_len);
+    std::_Destroy(_M_buffer, _M_buffer + _M_len);
     free(_M_buffer);
   }
 
index 895b98a6a527f4cf05bc471de314c058ce30cc13..95482f25de04dd0d015a56aadcf9f0efa31c0984 100644 (file)
@@ -615,7 +615,7 @@ namespace std
       {
        _Link_type __tmp = _M_get_node();
        try 
-         { _Construct(&__tmp->_M_value_field, __x); }
+         { std::_Construct(&__tmp->_M_value_field, __x); }
        catch(...)
          {
          _M_put_node(__tmp);
@@ -637,7 +637,7 @@ namespace std
       void
       destroy_node(_Link_type __p)
       {
-       _Destroy(&__p->_M_value_field);
+       std::_Destroy(&__p->_M_value_field);
        _M_put_node(__p);
       }
 
index 5f86058043367a4f6064ffe4f03ff41f99b71569..e2106e0a50a9d31775cac8bb2c37c2ddfd8c7541 100644 (file)
@@ -73,7 +73,7 @@ namespace std
     __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last,
                             _ForwardIterator __result,
                             __true_type)
-    { return copy(__first, __last, __result); }
+    { return std::copy(__first, __last, __result); }
 
   template<typename _InputIterator, typename _ForwardIterator>
     _ForwardIterator 
@@ -84,12 +84,12 @@ namespace std
       _ForwardIterator __cur = __result;
       try {
        for ( ; __first != __last; ++__first, ++__cur)
-         _Construct(&*__cur, *__first);
+         std::_Construct(&*__cur, *__first);
        return __cur;
       }
       catch(...)
        {
-         _Destroy(__result, __cur);
+         std::_Destroy(__result, __cur);
          __throw_exception_again; 
        }
     }
@@ -109,13 +109,13 @@ namespace std
     {
       typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
       typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
-      return __uninitialized_copy_aux(__first, __last, __result, _Is_POD());
+      return std::__uninitialized_copy_aux(__first, __last, __result, _Is_POD());
     }
 
   inline char*
   uninitialized_copy(const char* __first, const char* __last, char* __result)
   {
-    memmove(__result, __first, __last - __first);
+    std::memmove(__result, __first, __last - __first);
     return __result + (__last - __first);
   }
 
@@ -123,7 +123,7 @@ namespace std
   uninitialized_copy(const wchar_t* __first, const wchar_t* __last,
                     wchar_t* __result)
   {
-    memmove(__result, __first, sizeof(wchar_t) * (__last - __first));
+    std::memmove(__result, __first, sizeof(wchar_t) * (__last - __first));
     return __result + (__last - __first);
   }
 
@@ -133,7 +133,7 @@ namespace std
     inline void
     __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last, 
                             const _Tp& __x, __true_type)
-    { fill(__first, __last, __x); }
+    { std::fill(__first, __last, __x); }
 
   template<typename _ForwardIterator, typename _Tp>
     void
@@ -143,11 +143,11 @@ namespace std
       _ForwardIterator __cur = __first;
       try {
        for ( ; __cur != __last; ++__cur)
-         _Construct(&*__cur, __x);
+         std::_Construct(&*__cur, __x);
       }
       catch(...)
        {
-         _Destroy(__first, __cur);
+         std::_Destroy(__first, __cur);
          __throw_exception_again; 
        }
     }
@@ -167,7 +167,7 @@ namespace std
     {
       typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
       typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
-      __uninitialized_fill_aux(__first, __last, __x, _Is_POD());
+      std::__uninitialized_fill_aux(__first, __last, __x, _Is_POD());
     }
 
   // Valid if copy construction is equivalent to assignment, and if the
@@ -177,7 +177,7 @@ namespace std
     __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n,
                               const _Tp& __x, __true_type)
     {
-      return fill_n(__first, __n, __x);
+      return std::fill_n(__first, __n, __x);
     }
 
   template<typename _ForwardIterator, typename _Size, typename _Tp>
@@ -188,12 +188,12 @@ namespace std
       _ForwardIterator __cur = __first;
       try {
        for ( ; __n > 0; --__n, ++__cur)
-         _Construct(&*__cur, __x);
+         std::_Construct(&*__cur, __x);
        return __cur;
       }
       catch(...)
        { 
-         _Destroy(__first, __cur);
+         std::_Destroy(__first, __cur);
          __throw_exception_again; 
        }
     }
@@ -213,7 +213,7 @@ namespace std
     {
       typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
       typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
-      return __uninitialized_fill_n_aux(__first, __n, __x, _Is_POD());
+      return std::__uninitialized_fill_n_aux(__first, __n, __x, _Is_POD());
     }
 
   // Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill, 
@@ -230,13 +230,13 @@ namespace std
                              _InputIterator2 __first2, _InputIterator2 __last2,
                              _ForwardIterator __result)
     {
-      _ForwardIterator __mid = uninitialized_copy(__first1, __last1, __result);
+      _ForwardIterator __mid = std::uninitialized_copy(__first1, __last1, __result);
       try {
-       return uninitialized_copy(__first2, __last2, __mid);
+       return std::uninitialized_copy(__first2, __last2, __mid);
       }
       catch(...)
        { 
-         _Destroy(__result, __mid);
+         std::_Destroy(__result, __mid);
          __throw_exception_again; 
        }
     }
@@ -250,13 +250,13 @@ namespace std
                              const _Tp& __x,
                              _InputIterator __first, _InputIterator __last)
     {
-      uninitialized_fill(__result, __mid, __x);
+      std::uninitialized_fill(__result, __mid, __x);
       try {
-       return uninitialized_copy(__first, __last, __mid);
+       return std::uninitialized_copy(__first, __last, __mid);
       }
       catch(...)
        {
-         _Destroy(__result, __mid);
+         std::_Destroy(__result, __mid);
          __throw_exception_again; 
        }
     }
@@ -270,13 +270,13 @@ namespace std
                              _ForwardIterator __first2, _ForwardIterator __last2,
                              const _Tp& __x)
     {
-      _ForwardIterator __mid2 = uninitialized_copy(__first1, __last1, __first2);
+      _ForwardIterator __mid2 = std::uninitialized_copy(__first1, __last1, __first2);
       try {
-       uninitialized_fill(__mid2, __last2, __x);
+       std::uninitialized_fill(__mid2, __last2, __x);
       }
       catch(...)
        {
-         _Destroy(__first2, __mid2);
+         std::_Destroy(__first2, __mid2);
          __throw_exception_again; 
        }
     }
index bbd2edb8bb6f95954e834a712758e2637d3de726..91a6d9ba9ab06c7d81be6038791abb710e4be849 100644 (file)
@@ -239,7 +239,7 @@ namespace std
       vector(size_type __n, const value_type& __value,
             const allocator_type& __a = allocator_type())
       : _Base(__n, __a)
-      { this->_M_finish = uninitialized_fill_n(this->_M_start, __n, __value); }
+      { this->_M_finish = std::uninitialized_fill_n(this->_M_start, __n, __value); }
   
       /**
        *  @brief  Create a %vector with default elements.
@@ -251,8 +251,8 @@ namespace std
       explicit
       vector(size_type __n)
       : _Base(__n, allocator_type())
-      { this->_M_finish = uninitialized_fill_n(this->_M_start,
-                                              __n, value_type()); }
+      { this->_M_finish = std::uninitialized_fill_n(this->_M_start,
+                                                   __n, value_type()); }
       
       /**
        *  @brief  %Vector copy constructor.
@@ -265,8 +265,8 @@ namespace std
        */
       vector(const vector& __x)
       : _Base(__x.size(), __x.get_allocator())
-      { this->_M_finish = uninitialized_copy(__x.begin(), __x.end(),
-                                            this->_M_start);
+      { this->_M_finish = std::uninitialized_copy(__x.begin(), __x.end(),
+                                                 this->_M_start);
       }
   
       /**
@@ -298,7 +298,7 @@ namespace std
        *  themselves are pointers, the pointed-to memory is not touched in any
        *  way.  Managing the pointer is the user's responsibilty.
        */
-      ~vector() { _Destroy(this->_M_start, this->_M_finish); }
+      ~vector() { std::_Destroy(this->_M_start, this->_M_finish); }
   
       /**
        *  @brief  %Vector assignment operator.
@@ -600,7 +600,7 @@ namespace std
       {
        if (this->_M_finish != this->_M_end_of_storage)
          {
-           _Construct(this->_M_finish, __x);
+           std::_Construct(this->_M_finish, __x);
            ++this->_M_finish;
          }
        else
@@ -619,7 +619,7 @@ namespace std
       pop_back()
       {
        --this->_M_finish;
-       _Destroy(this->_M_finish);
+       std::_Destroy(this->_M_finish);
       }
       
       /**
@@ -756,7 +756,7 @@ namespace std
          pointer __result = _M_allocate(__n);
          try
            {
-             uninitialized_copy(__first, __last, __result);
+             std::uninitialized_copy(__first, __last, __result);
              return __result;
            }
          catch(...)
@@ -776,7 +776,7 @@ namespace std
         {
          this->_M_start = _M_allocate(__n);
          this->_M_end_of_storage = this->_M_start + __n;
-         this->_M_finish = uninitialized_fill_n(this->_M_start, __n, __value);
+         this->_M_finish = std::uninitialized_fill_n(this->_M_start, __n, __value);
        }
       
       // Called by the range constructor to implement [23.1.1]/9
@@ -809,8 +809,8 @@ namespace std
          size_type __n = std::distance(__first, __last);
          this->_M_start = _M_allocate(__n);
          this->_M_end_of_storage = this->_M_start + __n;
-         this->_M_finish = uninitialized_copy(__first, __last,
-                                              this->_M_start);
+         this->_M_finish = std::uninitialized_copy(__first, __last,
+                                                   this->_M_start);
        }
       
       
@@ -915,7 +915,7 @@ namespace std
     operator==(const vector<_Tp,_Alloc>& __x, const vector<_Tp,_Alloc>& __y)
     {
       return __x.size() == __y.size() &&
-             equal(__x.begin(), __x.end(), __y.begin());
+             std::equal(__x.begin(), __x.end(), __y.begin());
     }
   
   /**
@@ -933,8 +933,8 @@ namespace std
     inline bool
     operator<(const vector<_Tp,_Alloc>& __x, const vector<_Tp,_Alloc>& __y)
     {
-      return lexicographical_compare(__x.begin(), __x.end(),
-                                     __y.begin(), __y.end());
+      return std::lexicographical_compare(__x.begin(), __x.end(),
+                                         __y.begin(), __y.end());
     }
   
   /// Based on operator==
index 9ba261845b35738a78e27dcba0330d2e3cbd3f74..9cb0d68b3efbaa19e7383b65e639be99bd7a47af 100644 (file)
 #define _ROPE 1
 
 #include <bits/stl_algobase.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
 #include <bits/stl_algo.h>
 #include <bits/stl_function.h>
 #include <bits/stl_numeric.h>
 #include <bits/allocator.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
 #include <ext/hash_fun.h>
 
-
 # ifdef __GC
 #   define __GC_CONST const
 # else