57 #ifndef _STL_ALGOBASE_H
58 #define _STL_ALGOBASE_H 1
74 _GLIBCXX_BEGIN_NAMESPACE(std)
79 template<
bool _BoolType>
82 template<
typename _ForwardIterator1,
typename _ForwardIterator2>
84 iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
86 typedef typename iterator_traits<_ForwardIterator1>::value_type
88 _ValueType1 __tmp = _GLIBCXX_MOVE(*__a);
89 *__a = _GLIBCXX_MOVE(*__b);
90 *__b = _GLIBCXX_MOVE(__tmp);
95 struct __iter_swap<true>
97 template<
typename _ForwardIterator1,
typename _ForwardIterator2>
99 iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
115 template<
typename _ForwardIterator1,
typename _ForwardIterator2>
117 iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
119 typedef typename iterator_traits<_ForwardIterator1>::value_type
121 typedef typename iterator_traits<_ForwardIterator2>::value_type
125 __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
127 __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
129 __glibcxx_function_requires(_ConvertibleConcept<_ValueType1,
131 __glibcxx_function_requires(_ConvertibleConcept<_ValueType2,
134 typedef typename iterator_traits<_ForwardIterator1>::reference
136 typedef typename iterator_traits<_ForwardIterator2>::reference
138 std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value
139 && __are_same<_ValueType1&, _ReferenceType1>::__value
140 && __are_same<_ValueType2&, _ReferenceType2>::__value>::
156 template<
typename _ForwardIterator1,
typename _ForwardIterator2>
158 swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
159 _ForwardIterator2 __first2)
162 __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
164 __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
166 __glibcxx_requires_valid_range(__first1, __last1);
168 for (; __first1 != __last1; ++__first1, ++__first2)
184 template<
typename _Tp>
186 min(
const _Tp& __a,
const _Tp& __b)
189 __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
207 template<
typename _Tp>
209 max(
const _Tp& __a,
const _Tp& __b)
212 __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
230 template<
typename _Tp,
typename _Compare>
232 min(
const _Tp& __a,
const _Tp& __b, _Compare __comp)
235 if (__comp(__b, __a))
251 template<
typename _Tp,
typename _Compare>
253 max(
const _Tp& __a,
const _Tp& __b, _Compare __comp)
256 if (__comp(__a, __b))
264 template<
typename _Iterator,
265 bool _IsNormal = __is_normal_iterator<_Iterator>::__value>
273 template<
typename _Iterator>
274 struct __niter_base<_Iterator, true>
276 static typename _Iterator::iterator_type
278 {
return __it.base(); }
282 template<
typename _Iterator,
283 bool _IsMove = __is_move_iterator<_Iterator>::__value>
291 template<
typename _Iterator>
292 struct __miter_base<_Iterator, true>
294 static typename _Iterator::iterator_type
296 {
return __it.base(); }
305 template<
bool,
bool,
typename>
308 template<
typename _II,
typename _OI>
310 __copy_m(_II __first, _II __last, _OI __result)
312 for (; __first != __last; ++__result, ++__first)
313 *__result = *__first;
318 #ifdef __GXX_EXPERIMENTAL_CXX0X__
319 template<
typename _Category>
320 struct __copy_move<true, false, _Category>
322 template<
typename _II,
typename _OI>
324 __copy_m(_II __first, _II __last, _OI __result)
326 for (; __first != __last; ++__result, ++__first)
327 *__result = std::move(*__first);
334 struct __copy_move<false, false, random_access_iterator_tag>
336 template<
typename _II,
typename _OI>
338 __copy_m(_II __first, _II __last, _OI __result)
340 typedef typename iterator_traits<_II>::difference_type _Distance;
341 for(_Distance __n = __last - __first; __n > 0; --__n)
343 *__result = *__first;
351 #ifdef __GXX_EXPERIMENTAL_CXX0X__
353 struct __copy_move<true, false, random_access_iterator_tag>
355 template<
typename _II,
typename _OI>
357 __copy_m(_II __first, _II __last, _OI __result)
359 typedef typename iterator_traits<_II>::difference_type _Distance;
360 for(_Distance __n = __last - __first; __n > 0; --__n)
371 template<
bool _IsMove>
372 struct __copy_move<_IsMove, true, random_access_iterator_tag>
374 template<
typename _Tp>
376 __copy_m(
const _Tp* __first,
const _Tp* __last, _Tp* __result)
378 __builtin_memmove(__result, __first,
379 sizeof(_Tp) * (__last - __first));
380 return __result + (__last - __first);
384 template<
bool _IsMove,
typename _II,
typename _OI>
386 __copy_move_a(_II __first, _II __last, _OI __result)
388 typedef typename iterator_traits<_II>::value_type _ValueTypeI;
389 typedef typename iterator_traits<_OI>::value_type _ValueTypeO;
390 typedef typename iterator_traits<_II>::iterator_category _Category;
391 const bool __simple = (__is_pod(_ValueTypeI)
392 && __is_pointer<_II>::__value
393 && __is_pointer<_OI>::__value
394 && __are_same<_ValueTypeI, _ValueTypeO>::__value);
396 return std::__copy_move<_IsMove, __simple,
397 _Category>::__copy_m(__first, __last, __result);
402 template<
typename _CharT>
405 template<
typename _CharT,
typename _Traits>
406 class istreambuf_iterator;
408 template<
typename _CharT,
typename _Traits>
409 class ostreambuf_iterator;
411 template<
bool _IsMove,
typename _CharT>
412 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
413 ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
414 __copy_move_a2(_CharT*, _CharT*,
415 ostreambuf_iterator<_CharT, char_traits<_CharT> >);
417 template<
bool _IsMove,
typename _CharT>
418 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
419 ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
420 __copy_move_a2(
const _CharT*,
const _CharT*,
421 ostreambuf_iterator<_CharT, char_traits<_CharT> >);
423 template<
bool _IsMove,
typename _CharT>
424 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
426 __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >,
427 istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*);
429 template<
bool _IsMove,
typename _II,
typename _OI>
431 __copy_move_a2(_II __first, _II __last, _OI __result)
433 return _OI(std::__copy_move_a<_IsMove>
434 (std::__niter_base<_II>::__b(__first),
435 std::__niter_base<_II>::__b(__last),
436 std::__niter_base<_OI>::__b(__result)));
456 template<
typename _II,
typename _OI>
458 copy(_II __first, _II __last, _OI __result)
461 __glibcxx_function_requires(_InputIteratorConcept<_II>)
462 __glibcxx_function_requires(_OutputIteratorConcept<_OI,
463 typename iterator_traits<_II>::value_type>)
464 __glibcxx_requires_valid_range(__first, __last);
466 return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
467 (std::__miter_base<_II>::__b(__first),
468 std::__miter_base<_II>::__b(__last), __result));
471 #ifdef __GXX_EXPERIMENTAL_CXX0X__
489 template<
typename _II,
typename _OI>
491 move(_II __first, _II __last, _OI __result)
494 __glibcxx_function_requires(_InputIteratorConcept<_II>)
495 __glibcxx_function_requires(_OutputIteratorConcept<_OI,
496 typename iterator_traits<_II>::value_type>)
497 __glibcxx_requires_valid_range(__first, __last);
499 return (std::__copy_move_a2<true>
500 (std::__miter_base<_II>::__b(__first),
501 std::__miter_base<_II>::__b(__last), __result));
504 #define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::move(_Tp, _Up, _Vp)
506 #define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::copy(_Tp, _Up, _Vp)
509 template<
bool,
bool,
typename>
510 struct __copy_move_backward
512 template<
typename _BI1,
typename _BI2>
514 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
516 while (__first != __last)
517 *--__result = *--__last;
522 #ifdef __GXX_EXPERIMENTAL_CXX0X__
523 template<
typename _Category>
524 struct __copy_move_backward<true, false, _Category>
526 template<
typename _BI1,
typename _BI2>
528 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
530 while (__first != __last)
538 struct __copy_move_backward<false, false, random_access_iterator_tag>
540 template<
typename _BI1,
typename _BI2>
542 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
544 typename iterator_traits<_BI1>::difference_type __n;
545 for (__n = __last - __first; __n > 0; --__n)
546 *--__result = *--__last;
551 #ifdef __GXX_EXPERIMENTAL_CXX0X__
553 struct __copy_move_backward<true, false, random_access_iterator_tag>
555 template<
typename _BI1,
typename _BI2>
557 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
559 typename iterator_traits<_BI1>::difference_type __n;
560 for (__n = __last - __first; __n > 0; --__n)
561 *--__result = std::move(*--__last);
567 template<
bool _IsMove>
568 struct __copy_move_backward<_IsMove, true, random_access_iterator_tag>
570 template<
typename _Tp>
572 __copy_move_b(
const _Tp* __first,
const _Tp* __last, _Tp* __result)
574 const ptrdiff_t _Num = __last - __first;
575 __builtin_memmove(__result - _Num, __first,
sizeof(_Tp) * _Num);
576 return __result - _Num;
580 template<
bool _IsMove,
typename _BI1,
typename _BI2>
582 __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result)
584 typedef typename iterator_traits<_BI1>::value_type _ValueType1;
585 typedef typename iterator_traits<_BI2>::value_type _ValueType2;
586 typedef typename iterator_traits<_BI1>::iterator_category _Category;
587 const bool __simple = (__is_pod(_ValueType1)
588 && __is_pointer<_BI1>::__value
589 && __is_pointer<_BI2>::__value
590 && __are_same<_ValueType1, _ValueType2>::__value);
592 return std::__copy_move_backward<_IsMove, __simple,
593 _Category>::__copy_move_b(__first,
598 template<
bool _IsMove,
typename _BI1,
typename _BI2>
600 __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result)
602 return _BI2(std::__copy_move_backward_a<_IsMove>
603 (std::__niter_base<_BI1>::__b(__first),
604 std::__niter_base<_BI1>::__b(__last),
605 std::__niter_base<_BI2>::__b(__result)));
626 template<
typename _BI1,
typename _BI2>
628 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
631 __glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>)
632 __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
633 __glibcxx_function_requires(_ConvertibleConcept<
634 typename iterator_traits<_BI1>::value_type,
635 typename iterator_traits<_BI2>::value_type>)
636 __glibcxx_requires_valid_range(__first, __last);
638 return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value>
639 (std::__miter_base<_BI1>::__b(__first),
640 std::__miter_base<_BI1>::__b(__last), __result));
643 #ifdef __GXX_EXPERIMENTAL_CXX0X__
662 template<
typename _BI1,
typename _BI2>
667 __glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>)
668 __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
669 __glibcxx_function_requires(_ConvertibleConcept<
670 typename iterator_traits<_BI1>::value_type,
671 typename iterator_traits<_BI2>::value_type>)
672 __glibcxx_requires_valid_range(__first, __last);
674 return (std::__copy_move_backward_a2<true>
675 (std::__miter_base<_BI1>::__b(__first),
676 std::__miter_base<_BI1>::__b(__last), __result));
679 #define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::move_backward(_Tp, _Up, _Vp)
681 #define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::copy_backward(_Tp, _Up, _Vp)
684 template<
typename _ForwardIterator,
typename _Tp>
686 __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value,
void>::__type
687 __fill_a(_ForwardIterator __first, _ForwardIterator __last,
690 for (; __first != __last; ++__first)
694 template<
typename _ForwardIterator,
typename _Tp>
696 __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value,
void>::__type
697 __fill_a(_ForwardIterator __first, _ForwardIterator __last,
700 const _Tp __tmp = __value;
701 for (; __first != __last; ++__first)
706 template<
typename _Tp>
708 __gnu_cxx::__enable_if<__is_byte<_Tp>::__value,
void>::__type
709 __fill_a(_Tp* __first, _Tp* __last,
const _Tp& __c)
711 const _Tp __tmp = __c;
712 __builtin_memset(__first, static_cast<unsigned char>(__tmp),
728 template<
typename _ForwardIterator,
typename _Tp>
730 fill(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __value)
733 __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
735 __glibcxx_requires_valid_range(__first, __last);
737 std::__fill_a(std::__niter_base<_ForwardIterator>::__b(__first),
738 std::__niter_base<_ForwardIterator>::__b(__last), __value);
741 template<
typename _OutputIterator,
typename _Size,
typename _Tp>
743 __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type
744 __fill_n_a(_OutputIterator __first, _Size __n,
const _Tp& __value)
746 for (; __n > 0; --__n, ++__first)
751 template<
typename _OutputIterator,
typename _Size,
typename _Tp>
753 __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type
754 __fill_n_a(_OutputIterator __first, _Size __n,
const _Tp& __value)
756 const _Tp __tmp = __value;
757 for (; __n > 0; --__n, ++__first)
762 template<
typename _Size,
typename _Tp>
764 __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type
765 __fill_n_a(_Tp* __first, _Size __n,
const _Tp& __c)
767 std::__fill_a(__first, __first + __n, __c);
768 return __first + __n;
783 template<
typename _OI,
typename _Size,
typename _Tp>
785 fill_n(_OI __first, _Size __n,
const _Tp& __value)
788 __glibcxx_function_requires(_OutputIteratorConcept<_OI, _Tp>)
790 return _OI(std::__fill_n_a(std::__niter_base<_OI>::__b(__first),
794 template<
bool _BoolType>
797 template<
typename _II1,
typename _II2>
799 equal(_II1 __first1, _II1 __last1, _II2 __first2)
801 for (; __first1 != __last1; ++__first1, ++__first2)
802 if (!(*__first1 == *__first2))
811 template<
typename _Tp>
813 equal(
const _Tp* __first1,
const _Tp* __last1,
const _Tp* __first2)
815 return !__builtin_memcmp(__first1, __first2,
sizeof(_Tp)
816 * (__last1 - __first1));
820 template<
typename _II1,
typename _II2>
822 __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2)
824 typedef typename iterator_traits<_II1>::value_type _ValueType1;
825 typedef typename iterator_traits<_II2>::value_type _ValueType2;
826 const bool __simple = (__is_integer<_ValueType1>::__value
827 && __is_pointer<_II1>::__value
828 && __is_pointer<_II2>::__value
829 && __are_same<_ValueType1, _ValueType2>::__value);
831 return std::__equal<__simple>::equal(__first1, __last1, __first2);
835 template<
typename,
typename>
838 template<
typename _II1,
typename _II2>
840 __newlast1(_II1, _II1 __last1, _II2, _II2)
843 template<
typename _II>
845 __cnd2(_II __first, _II __last)
846 {
return __first != __last; }
850 struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag>
852 template<
typename _RAI1,
typename _RAI2>
854 __newlast1(_RAI1 __first1, _RAI1 __last1,
855 _RAI2 __first2, _RAI2 __last2)
857 const typename iterator_traits<_RAI1>::difference_type
858 __diff1 = __last1 - __first1;
859 const typename iterator_traits<_RAI2>::difference_type
860 __diff2 = __last2 - __first2;
861 return __diff2 < __diff1 ? __first1 + __diff2 : __last1;
864 template<
typename _RAI>
870 template<
bool _BoolType>
871 struct __lexicographical_compare
873 template<
typename _II1,
typename _II2>
874 static bool __lc(_II1, _II1, _II2, _II2);
877 template<
bool _BoolType>
878 template<
typename _II1,
typename _II2>
880 __lexicographical_compare<_BoolType>::
881 __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
883 typedef typename iterator_traits<_II1>::iterator_category _Category1;
884 typedef typename iterator_traits<_II2>::iterator_category _Category2;
885 typedef std::__lc_rai<_Category1, _Category2> __rai_type;
887 __last1 = __rai_type::__newlast1(__first1, __last1,
889 for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
890 ++__first1, ++__first2)
892 if (*__first1 < *__first2)
894 if (*__first2 < *__first1)
897 return __first1 == __last1 && __first2 != __last2;
901 struct __lexicographical_compare<true>
903 template<
typename _Tp,
typename _Up>
905 __lc(
const _Tp* __first1,
const _Tp* __last1,
906 const _Up* __first2,
const _Up* __last2)
908 const size_t __len1 = __last1 - __first1;
909 const size_t __len2 = __last2 - __first2;
910 const int __result = __builtin_memcmp(__first1, __first2,
912 return __result != 0 ? __result < 0 : __len1 < __len2;
916 template<
typename _II1,
typename _II2>
918 __lexicographical_compare_aux(_II1 __first1, _II1 __last1,
919 _II2 __first2, _II2 __last2)
921 typedef typename iterator_traits<_II1>::value_type _ValueType1;
922 typedef typename iterator_traits<_II2>::value_type _ValueType2;
923 const bool __simple =
924 (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value
925 && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed
926 && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed
927 && __is_pointer<_II1>::__value
928 && __is_pointer<_II2>::__value);
930 return std::__lexicographical_compare<__simple>::__lc(__first1, __last1,
934 _GLIBCXX_END_NAMESPACE
936 _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
950 template<typename _II1, typename _II2>
952 equal(_II1 __first1, _II1 __last1, _II2 __first2)
955 __glibcxx_function_requires(_InputIteratorConcept<_II1>)
956 __glibcxx_function_requires(_InputIteratorConcept<_II2>)
957 __glibcxx_function_requires(_EqualOpConcept<
958 typename iterator_traits<_II1>::value_type,
959 typename iterator_traits<_II2>::value_type>)
960 __glibcxx_requires_valid_range(__first1, __last1);
962 return std::__equal_aux(std::__niter_base<_II1>::__b(__first1),
963 std::__niter_base<_II1>::__b(__last1),
964 std::__niter_base<_II2>::__b(__first2));
982 template<
typename _IIter1,
typename _IIter2,
typename _BinaryPredicate>
984 equal(_IIter1 __first1, _IIter1 __last1,
985 _IIter2 __first2, _BinaryPredicate __binary_pred)
988 __glibcxx_function_requires(_InputIteratorConcept<_IIter1>)
989 __glibcxx_function_requires(_InputIteratorConcept<_IIter2>)
990 __glibcxx_requires_valid_range(__first1, __last1);
992 for (; __first1 != __last1; ++__first1, ++__first2)
993 if (!
bool(__binary_pred(*__first1, *__first2)))
1013 template<
typename _II1,
typename _II2>
1015 lexicographical_compare(_II1 __first1, _II1 __last1,
1016 _II2 __first2, _II2 __last2)
1019 typedef typename iterator_traits<_II1>::value_type _ValueType1;
1020 typedef typename iterator_traits<_II2>::value_type _ValueType2;
1021 __glibcxx_function_requires(_InputIteratorConcept<_II1>)
1022 __glibcxx_function_requires(_InputIteratorConcept<_II2>)
1023 __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
1024 __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
1025 __glibcxx_requires_valid_range(__first1, __last1);
1026 __glibcxx_requires_valid_range(__first2, __last2);
1028 return std::__lexicographical_compare_aux
1029 (std::__niter_base<_II1>::__b(__first1),
1030 std::__niter_base<_II1>::__b(__last1),
1031 std::__niter_base<_II2>::__b(__first2),
1032 std::__niter_base<_II2>::__b(__last2));
1048 template<
typename _II1,
typename _II2,
typename _Compare>
1050 lexicographical_compare(_II1 __first1, _II1 __last1,
1051 _II2 __first2, _II2 __last2, _Compare __comp)
1053 typedef typename iterator_traits<_II1>::iterator_category _Category1;
1054 typedef typename iterator_traits<_II2>::iterator_category _Category2;
1055 typedef std::__lc_rai<_Category1, _Category2> __rai_type;
1058 __glibcxx_function_requires(_InputIteratorConcept<_II1>)
1059 __glibcxx_function_requires(_InputIteratorConcept<_II2>)
1060 __glibcxx_requires_valid_range(__first1, __last1);
1061 __glibcxx_requires_valid_range(__first2, __last2);
1063 __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2);
1064 for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
1065 ++__first1, ++__first2)
1067 if (__comp(*__first1, *__first2))
1069 if (__comp(*__first2, *__first1))
1072 return __first1 == __last1 && __first2 != __last2;
1088 template<
typename _InputIterator1,
typename _InputIterator2>
1089 pair<_InputIterator1, _InputIterator2>
1090 mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
1091 _InputIterator2 __first2)
1094 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
1095 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
1096 __glibcxx_function_requires(_EqualOpConcept<
1097 typename iterator_traits<_InputIterator1>::value_type,
1098 typename iterator_traits<_InputIterator2>::value_type>)
1099 __glibcxx_requires_valid_range(__first1, __last1);
1101 while (__first1 != __last1 && *__first1 == *__first2)
1125 template<
typename _InputIterator1,
typename _InputIterator2,
1126 typename _BinaryPredicate>
1127 pair<_InputIterator1, _InputIterator2>
1128 mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
1129 _InputIterator2 __first2, _BinaryPredicate __binary_pred)
1132 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
1133 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
1134 __glibcxx_requires_valid_range(__first1, __last1);
1136 while (__first1 != __last1 &&
bool(__binary_pred(*__first1, *__first2)))
1144 _GLIBCXX_END_NESTED_NAMESPACE
1149 #ifdef _GLIBCXX_PARALLEL