]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/27199 (ptrdiff_t and size_t outside of namespace std)
authorMarc Glisse <marc.glisse@normalesup.org>
Sun, 23 Apr 2006 14:54:26 +0000 (14:54 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 23 Apr 2006 14:54:26 +0000 (14:54 +0000)
2006-04-23  Marc Glisse  <marc.glisse@normalesup.org>

PR libstdc++/27199
* ext/pool_allocator.h: Add using declarations for size_t, ptrdiff_t.
* ext/bitmap_allocator.h: Likewise; qualify with std::.
* ext/new_allocator.h: Likewise.
* ext/malloc_allocator.h: Likewise.
* ext/array_allocator.h: Likewise.
* ext/mt_allocator.h: Likewise.
* ext/functional: Likewise for size_t.
* ext/debug_allocator.h: Likewise.
* bits/char_traits.h: Qualify with std:: size_t.
* debug/hash_multimap.h: Likewise.

From-SVN: r113195

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/char_traits.h
libstdc++-v3/include/debug/hash_multimap.h
libstdc++-v3/include/ext/array_allocator.h
libstdc++-v3/include/ext/bitmap_allocator.h
libstdc++-v3/include/ext/debug_allocator.h
libstdc++-v3/include/ext/functional
libstdc++-v3/include/ext/malloc_allocator.h
libstdc++-v3/include/ext/mt_allocator.h
libstdc++-v3/include/ext/new_allocator.h
libstdc++-v3/include/ext/pool_allocator.h

index a9ed643112cae29ae1063c2ce4b7eceed6ff1a5c..27437c5a5488242db067c06758b8cfa73eea18e9 100644 (file)
@@ -1,3 +1,17 @@
+2006-04-23  Marc Glisse  <marc.glisse@normalesup.org>
+
+       PR libstdc++/27199
+       * ext/pool_allocator.h: Add using declarations for size_t, ptrdiff_t.
+       * ext/bitmap_allocator.h: Likewise; qualify with std::.
+       * ext/new_allocator.h: Likewise.
+       * ext/malloc_allocator.h: Likewise.
+       * ext/array_allocator.h: Likewise.
+       * ext/mt_allocator.h: Likewise.
+       * ext/functional: Likewise for size_t.
+       * ext/debug_allocator.h: Likewise.
+       * bits/char_traits.h: Qualify with std:: size_t.
+       * debug/hash_multimap.h: Likewise.
+
 2006-04-23  Paolo Carlini  <pcarlini@suse.de>
 
        * docs/html/ext/lwg-active.html, lwg-defects.html: Import Revision 42.
index 410e01b238d624fb2d1d2c3f6e016f16f267928d..4431036c50f67d109c280373bcb29349b961e33b 100644 (file)
@@ -148,7 +148,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
     char_traits<_CharT>::
     compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
     {
-      for (size_t __i = 0; __i < __n; ++__i)
+      for (std::size_t __i = 0; __i < __n; ++__i)
        if (lt(__s1[__i], __s2[__i]))
          return -1;
        else if (lt(__s2[__i], __s1[__i]))
index 7bdb9d5d150da4939e825c78896d498ebfb80b5b..73407534120ffd3f7a4b8d3f33ccd068e48ca3db 100644 (file)
@@ -181,7 +181,7 @@ namespace __debug
       erase(const key_type& __key)
       {
        std::pair<iterator, iterator> __victims = this->equal_range(__key);
-       size_t __num_victims = 0;
+       std::size_t __num_victims = 0;
        while (__victims.first != __victims.second)
        {
          this->erase(__victims.first++);
index 02af57893fce68d5c7107ad91b9a0598f3df5970..d7e9670d227083d37a24db58cb410762a565ca33 100644 (file)
@@ -41,6 +41,9 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
+ using std::size_t;
+ using std::ptrdiff_t;
+
   /// @brief  Base class.
  template<typename _Tp>
     class array_allocator_base
index 6d80c99e509864961c0deb791ed9bcab1d4d678a..42109b468912167ab4b800fb5138c53dcc2eaad5 100644 (file)
@@ -71,6 +71,9 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
+  using std::size_t;
+  using std::ptrdiff_t;
+
 #if defined __GTHREADS
   namespace
   {
@@ -238,8 +241,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
        typedef _Tp* pointer;
        typedef _Tp& reference;
        typedef const _Tp& const_reference;
-       typedef std::size_t size_type;
-       typedef std::ptrdiff_t difference_type;
+       typedef size_t size_type;
+       typedef ptrdiff_t difference_type;
        typedef pointer iterator;
 
       private:
@@ -396,7 +399,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       struct __mv_iter_traits<_Tp*>
       {
        typedef _Tp value_type;
-       typedef std::ptrdiff_t difference_type;
+       typedef ptrdiff_t difference_type;
       };
 
     enum 
@@ -865,8 +868,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
     class bitmap_allocator : private free_list
     {
     public:
-      typedef std::size_t    size_type;
-      typedef std::ptrdiff_t difference_type;
+      typedef size_t    size_type;
+      typedef ptrdiff_t difference_type;
       typedef _Tp*        pointer;
       typedef const _Tp*  const_pointer;
       typedef _Tp&        reference;
index aa96507472294387b8eb77667e668ece29375019..43a9a8719988d4d277e33f91e1d515ac5a87bdf5 100644 (file)
@@ -52,6 +52,8 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
+  using std::size_t;
+
   /**
    *  @brief  A meta-allocator with debugging bits, as per [20.4].
    *
index c100f59cbd6448a8b9f8bbe9e2c7afadb148506f..f159e11d639959c9c6a882fa5e8a6611a7a956ba 100644 (file)
@@ -67,6 +67,7 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
+  using std::size_t;
   using std::unary_function;
   using std::binary_function;
   using std::mem_fun1_t;
index 8143539778875a429935bbff3e119593f9bdf4b3..0f23e06c8e8a63b71327364acabe8a3faae32017 100644 (file)
@@ -40,6 +40,9 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
+  using std::size_t;
+  using std::ptrdiff_t;
+
   /**
    *  @brief  An allocator that uses malloc.
    *
index fb7e370f954fd33abac721a07836e22f2f134b28..0b557bad399be75b4a581a8dbdfd7d53720a846b 100644 (file)
@@ -42,6 +42,9 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
+  using std::size_t;
+  using std::ptrdiff_t;
+
   typedef void (*__destroy_handler)(void*);
 
   /// @brief  Base class for pool object.
index b761b0041c6a26d4687d548e7d1120c2361215bc..938783c4b1e49146c704fe1a21c4f0ea229d69af 100644 (file)
@@ -39,6 +39,9 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
+  using std::size_t;
+  using std::ptrdiff_t;
+
   /**
    *  @brief  An allocator that uses global new, as per [20.4].
    *
index e11c1663d585730ba685c483539bf2db3d571ba8..a9f060a54605ea97198628a52363e5fe999636c1 100644 (file)
@@ -56,6 +56,9 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
+  using std::size_t;
+  using std::ptrdiff_t;
+
   /**
    *  @brief  Base class for __pool_alloc.
    *