]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
stl_algobase.h (mismatch): Move...
authorPaolo Carlini <pcarlini@suse.de>
Thu, 17 May 2007 11:52:06 +0000 (11:52 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 17 May 2007 11:52:06 +0000 (11:52 +0000)
2007-05-17  Paolo Carlini  <pcarlini@suse.de>

* include/bits/stl_algobase.h (mismatch): Move...
* include/bits/stl_algo.h: ... here.

From-SVN: r124792

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_algo.h
libstdc++-v3/include/bits/stl_algobase.h

index 0c8b184a7445b296347f5fddbd269f75454d8e98..6a1f923d6e713a81312dc34ed73ecefb8287159e 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-17  Paolo Carlini  <pcarlini@suse.de>
+
+       * include/bits/stl_algobase.h (mismatch): Move...
+       * include/bits/stl_algo.h: ... here.
+
 2007-05-17  Benjamin Kosnik  <bkoz@redhat.com>
 
        * include/tr1/cmath: Guard special math with
index 0621261e827c8ab9ec3f77242490b059dafeeaa7..1d743ab94b4bd9e3a0a9f3ac3e617ce9e2395ffb 100644 (file)
@@ -449,6 +449,72 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       return __n;
     }
 
+  /**
+   *  @brief Finds the places in ranges which don't match.
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @return   A pair of iterators pointing to the first mismatch.
+   *
+   *  This compares the elements of two ranges using @c == and returns a pair
+   *  of iterators.  The first iterator points into the first range, the
+   *  second iterator points into the second range, and the elements pointed
+   *  to by the iterators are not equal.
+  */
+  template<typename _InputIterator1, typename _InputIterator2>
+    pair<_InputIterator1, _InputIterator2>
+    mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
+            _InputIterator2 __first2)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_function_requires(_EqualOpConcept<
+           typename iterator_traits<_InputIterator1>::value_type,
+           typename iterator_traits<_InputIterator2>::value_type>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+
+      while (__first1 != __last1 && *__first1 == *__first2)
+        {
+         ++__first1;
+         ++__first2;
+        }
+      return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
+    }
+
+  /**
+   *  @brief Finds the places in ranges which don't match.
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @param  binary_pred  A binary predicate @link s20_3_1_base functor@endlink.
+   *  @return   A pair of iterators pointing to the first mismatch.
+   *
+   *  This compares the elements of two ranges using the binary_pred
+   *  parameter, and returns a pair
+   *  of iterators.  The first iterator points into the first range, the
+   *  second iterator points into the second range, and the elements pointed
+   *  to by the iterators are not equal.
+  */
+  template<typename _InputIterator1, typename _InputIterator2,
+          typename _BinaryPredicate>
+    pair<_InputIterator1, _InputIterator2>
+    mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
+            _InputIterator2 __first2, _BinaryPredicate __binary_pred)
+    {
+      // concept requirements
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+      __glibcxx_requires_valid_range(__first1, __last1);
+
+      while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2)))
+        {
+         ++__first1;
+         ++__first2;
+        }
+      return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
+    }
+
   /**
    *  @brief Search a sequence for a matching sub-sequence.
    *  @param  first1  A forward iterator.
index caf219d1fbb85c435c08ab92a3d86dcdd61cbc0f..f9f58373affdb0a5bb47614cdcd3f64ac6663b42 100644 (file)
@@ -678,72 +678,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
                                   __value));
     }
 
-  /**
-   *  @brief Finds the places in ranges which don't match.
-   *  @param  first1  An input iterator.
-   *  @param  last1   An input iterator.
-   *  @param  first2  An input iterator.
-   *  @return   A pair of iterators pointing to the first mismatch.
-   *
-   *  This compares the elements of two ranges using @c == and returns a pair
-   *  of iterators.  The first iterator points into the first range, the
-   *  second iterator points into the second range, and the elements pointed
-   *  to by the iterators are not equal.
-  */
-  template<typename _InputIterator1, typename _InputIterator2>
-    pair<_InputIterator1, _InputIterator2>
-    mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
-            _InputIterator2 __first2)
-    {
-      // concept requirements
-      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
-      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
-      __glibcxx_function_requires(_EqualOpConcept<
-           typename iterator_traits<_InputIterator1>::value_type,
-           typename iterator_traits<_InputIterator2>::value_type>)
-      __glibcxx_requires_valid_range(__first1, __last1);
-
-      while (__first1 != __last1 && *__first1 == *__first2)
-        {
-         ++__first1;
-         ++__first2;
-        }
-      return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
-    }
-
-  /**
-   *  @brief Finds the places in ranges which don't match.
-   *  @param  first1  An input iterator.
-   *  @param  last1   An input iterator.
-   *  @param  first2  An input iterator.
-   *  @param  binary_pred  A binary predicate @link s20_3_1_base functor@endlink.
-   *  @return   A pair of iterators pointing to the first mismatch.
-   *
-   *  This compares the elements of two ranges using the binary_pred
-   *  parameter, and returns a pair
-   *  of iterators.  The first iterator points into the first range, the
-   *  second iterator points into the second range, and the elements pointed
-   *  to by the iterators are not equal.
-  */
-  template<typename _InputIterator1, typename _InputIterator2,
-          typename _BinaryPredicate>
-    pair<_InputIterator1, _InputIterator2>
-    mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
-            _InputIterator2 __first2, _BinaryPredicate __binary_pred)
-    {
-      // concept requirements
-      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
-      __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
-      __glibcxx_requires_valid_range(__first1, __last1);
-
-      while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2)))
-        {
-         ++__first1;
-         ++__first2;
-        }
-      return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
-    }
-
 
   template<bool _BoolType>
     struct __equal