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

[v3] Further fixes for ext/iterator


Hi,

this is necessary to allow the user to include <ext/iterator> by itself. Tested
i686-pc-linux-gnu. Approved by Benjamin Kosnik.

Cheers,
Paolo.

//////////

2001-12-31  Paolo Carlini  <pcarlini@unitus.it>

        * include/ext/iterator:  Add #include <bits/std_iterator.h>, tweak.
        * testsuite/ext/headers.cc:  Add <ext/iterator>.

===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/ext/iterator,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gcc/libstdc++-v3/include/ext/iterator       2001/12/31 16:16:17     1.1
+++ gcc/libstdc++-v3/include/ext/iterator       2001/12/31 19:30:24     1.2
@@ -63,6 +63,7 @@

 #pragma GCC system_header
 #include <bits/concept_check.h>
+#include <bits/std_iterator.h>

 namespace __gnu_cxx
 {
@@ -74,7 +75,7 @@
   template<typename _InputIterator, typename _Distance>
     inline void
     __distance(_InputIterator __first, _InputIterator __last,
-              _Distance& __n, input_iterator_tag)
+              _Distance& __n, std::input_iterator_tag)
     {
       // concept requirements
       __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
@@ -84,7 +85,7 @@
   template<typename _RandomAccessIterator, typename _Distance>
     inline void
     __distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
-              _Distance& __n, random_access_iterator_tag)
+              _Distance& __n, std::random_access_iterator_tag)
     {
       // concept requirements

__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)

@@ -97,7 +98,7 @@
              _Distance& __n)
     {
       // concept requirements -- taken care of in __distance
-      __distance(__first, __last, __n, __iterator_category(__first));
+      __distance(__first, __last, __n, std::__iterator_category(__first));
     }

 } // namespace __gnu_cxx

===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/headers.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gcc/libstdc++-v3/testsuite/ext/headers.cc   2001/12/28 18:46:53     1.3
+++ gcc/libstdc++-v3/testsuite/ext/headers.cc   2001/12/31 19:30:22     1.4
@@ -26,6 +26,7 @@
 #include <ext/algorithm>
 #include <ext/hash_map>
 #include <ext/hash_set>
+#include <ext/iterator>
 #include <ext/rope>
 #include <ext/slist>




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