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]

Re: [v3] libstdc++/27199


Marc Glisse wrote:

Hello,

(it is the first time I propose a patch so please tell me if I am doing anything wrong)

The patch looks good to me and the below is what I mean to commit soon (tested x86-linux, without PCHs too). If you are planning to contribute more, then you have to go through the normal Copyright Assignment process


http://gcc.gnu.org/contribute.html

Then, make sure your testing setup is reliable, always prepare ChangeLog entries to come together with the patches, details in due course... ;)

Thanks for now,
Paolo.

////////////////////////
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.
Index: include/ext/pool_allocator.h
===================================================================
--- include/ext/pool_allocator.h	(revision 113135)
+++ include/ext/pool_allocator.h	(working copy)
@@ -56,6 +56,9 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
+  using std::size_t;
+  using std::ptrdiff_t;
+
   /**
    *  @brief  Base class for __pool_alloc.
    *
Index: include/ext/bitmap_allocator.h
===================================================================
--- include/ext/bitmap_allocator.h	(revision 113135)
+++ include/ext/bitmap_allocator.h	(working copy)
@@ -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 @@
 	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 @@
       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 @@
     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: include/ext/new_allocator.h
===================================================================
--- include/ext/new_allocator.h	(revision 113135)
+++ include/ext/new_allocator.h	(working copy)
@@ -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: include/ext/malloc_allocator.h
===================================================================
--- include/ext/malloc_allocator.h	(revision 113135)
+++ include/ext/malloc_allocator.h	(working copy)
@@ -40,6 +40,9 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
+  using std::size_t;
+  using std::ptrdiff_t;
+
   /**
    *  @brief  An allocator that uses malloc.
    *
Index: include/ext/functional
===================================================================
--- include/ext/functional	(revision 113135)
+++ include/ext/functional	(working copy)
@@ -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: include/ext/array_allocator.h
===================================================================
--- include/ext/array_allocator.h	(revision 113135)
+++ include/ext/array_allocator.h	(working copy)
@@ -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: include/ext/mt_allocator.h
===================================================================
--- include/ext/mt_allocator.h	(revision 113135)
+++ include/ext/mt_allocator.h	(working copy)
@@ -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: include/ext/debug_allocator.h
===================================================================
--- include/ext/debug_allocator.h	(revision 113135)
+++ include/ext/debug_allocator.h	(working copy)
@@ -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: include/bits/char_traits.h
===================================================================
--- include/bits/char_traits.h	(revision 113135)
+++ include/bits/char_traits.h	(working copy)
@@ -148,7 +148,7 @@
     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: include/debug/hash_multimap.h
===================================================================
--- include/debug/hash_multimap.h	(revision 113135)
+++ include/debug/hash_multimap.h	(working copy)
@@ -181,7 +181,7 @@
       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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]