30 #ifndef _GLIBCXX_ALGORITHMFWD_H 31 #define _GLIBCXX_ALGORITHMFWD_H 1 33 #pragma GCC system_header 38 #if __cplusplus >= 201103L 42 namespace std _GLIBCXX_VISIBILITY(default)
44 _GLIBCXX_BEGIN_NAMESPACE_VERSION
193 #if __cplusplus >= 201103L 194 template<
typename _IIter,
typename _Predicate>
196 all_of(_IIter, _IIter, _Predicate);
198 template<
typename _IIter,
typename _Predicate>
200 any_of(_IIter, _IIter, _Predicate);
203 template<
typename _FIter,
typename _Tp>
205 binary_search(_FIter, _FIter,
const _Tp&);
207 template<
typename _FIter,
typename _Tp,
typename _Compare>
209 binary_search(_FIter, _FIter,
const _Tp&, _Compare);
211 template<
typename _IIter,
typename _OIter>
213 copy(_IIter, _IIter, _OIter);
215 template<
typename _BIter1,
typename _BIter2>
217 copy_backward(_BIter1, _BIter1, _BIter2);
219 #if __cplusplus >= 201103L 220 template<
typename _IIter,
typename _OIter,
typename _Predicate>
222 copy_if(_IIter, _IIter, _OIter, _Predicate);
224 template<
typename _IIter,
typename _Size,
typename _OIter>
226 copy_n(_IIter, _Size, _OIter);
232 template<
typename _FIter,
typename _Tp>
234 equal_range(_FIter, _FIter,
const _Tp&);
236 template<
typename _FIter,
typename _Tp,
typename _Compare>
238 equal_range(_FIter, _FIter,
const _Tp&, _Compare);
240 template<
typename _FIter,
typename _Tp>
242 fill(_FIter, _FIter,
const _Tp&);
244 template<
typename _OIter,
typename _Size,
typename _Tp>
246 fill_n(_OIter, _Size,
const _Tp&);
250 template<
typename _FIter1,
typename _FIter2>
252 find_end(_FIter1, _FIter1, _FIter2, _FIter2);
254 template<
typename _FIter1,
typename _FIter2,
typename _BinaryPredicate>
256 find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
261 #if __cplusplus >= 201103L 262 template<
typename _IIter,
typename _Predicate>
264 find_if_not(_IIter, _IIter, _Predicate);
271 template<
typename _IIter1,
typename _IIter2>
273 includes(_IIter1, _IIter1, _IIter2, _IIter2);
275 template<
typename _IIter1,
typename _IIter2,
typename _Compare>
277 includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
279 template<
typename _BIter>
281 inplace_merge(_BIter, _BIter, _BIter);
283 template<
typename _BIter,
typename _Compare>
285 inplace_merge(_BIter, _BIter, _BIter, _Compare);
287 #if __cplusplus >= 201103L 288 template<
typename _RAIter>
290 is_heap(_RAIter, _RAIter);
292 template<
typename _RAIter,
typename _Compare>
294 is_heap(_RAIter, _RAIter, _Compare);
296 template<
typename _RAIter>
298 is_heap_until(_RAIter, _RAIter);
300 template<
typename _RAIter,
typename _Compare>
302 is_heap_until(_RAIter, _RAIter, _Compare);
304 template<
typename _IIter,
typename _Predicate>
306 is_partitioned(_IIter, _IIter, _Predicate);
308 template<
typename _FIter1,
typename _FIter2>
310 is_permutation(_FIter1, _FIter1, _FIter2);
312 template<
typename _FIter1,
typename _FIter2,
313 typename _BinaryPredicate>
315 is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate);
317 template<
typename _FIter>
319 is_sorted(_FIter, _FIter);
321 template<
typename _FIter,
typename _Compare>
323 is_sorted(_FIter, _FIter, _Compare);
325 template<
typename _FIter>
327 is_sorted_until(_FIter, _FIter);
329 template<
typename _FIter,
typename _Compare>
331 is_sorted_until(_FIter, _FIter, _Compare);
334 template<
typename _FIter1,
typename _FIter2>
336 iter_swap(_FIter1, _FIter2);
338 template<
typename _FIter,
typename _Tp>
340 lower_bound(_FIter, _FIter,
const _Tp&);
342 template<
typename _FIter,
typename _Tp,
typename _Compare>
344 lower_bound(_FIter, _FIter,
const _Tp&, _Compare);
346 template<
typename _RAIter>
348 make_heap(_RAIter, _RAIter);
350 template<
typename _RAIter,
typename _Compare>
352 make_heap(_RAIter, _RAIter, _Compare);
354 template<
typename _Tp>
357 max(
const _Tp&,
const _Tp&);
359 template<
typename _Tp,
typename _Compare>
362 max(
const _Tp&,
const _Tp&, _Compare);
367 template<
typename _Tp>
370 min(
const _Tp&,
const _Tp&);
372 template<
typename _Tp,
typename _Compare>
375 min(
const _Tp&,
const _Tp&, _Compare);
379 #if __cplusplus >= 201103L 380 template<
typename _Tp>
382 pair<const _Tp&, const _Tp&>
383 minmax(
const _Tp&,
const _Tp&);
385 template<
typename _Tp,
typename _Compare>
387 pair<const _Tp&, const _Tp&>
388 minmax(
const _Tp&,
const _Tp&, _Compare);
390 template<
typename _FIter>
393 minmax_element(_FIter, _FIter);
395 template<
typename _FIter,
typename _Compare>
398 minmax_element(_FIter, _FIter, _Compare);
400 template<
typename _Tp>
403 min(initializer_list<_Tp>);
405 template<
typename _Tp,
typename _Compare>
408 min(initializer_list<_Tp>, _Compare);
410 template<
typename _Tp>
413 max(initializer_list<_Tp>);
415 template<
typename _Tp,
typename _Compare>
418 max(initializer_list<_Tp>, _Compare);
420 template<
typename _Tp>
423 minmax(initializer_list<_Tp>);
425 template<
typename _Tp,
typename _Compare>
428 minmax(initializer_list<_Tp>, _Compare);
433 template<
typename _BIter>
435 next_permutation(_BIter, _BIter);
437 template<
typename _BIter,
typename _Compare>
439 next_permutation(_BIter, _BIter, _Compare);
441 #if __cplusplus >= 201103L 442 template<
typename _IIter,
typename _Predicate>
444 none_of(_IIter, _IIter, _Predicate);
450 template<
typename _IIter,
typename _RAIter>
452 partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter);
454 template<
typename _IIter,
typename _RAIter,
typename _Compare>
456 partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare);
460 #if __cplusplus >= 201103L 461 template<
typename _IIter,
typename _OIter1,
462 typename _OIter2,
typename _Predicate>
463 pair<_OIter1, _OIter2>
464 partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate);
466 template<
typename _FIter,
typename _Predicate>
468 partition_point(_FIter, _FIter, _Predicate);
471 template<
typename _RAIter>
473 pop_heap(_RAIter, _RAIter);
475 template<
typename _RAIter,
typename _Compare>
477 pop_heap(_RAIter, _RAIter, _Compare);
479 template<
typename _BIter>
481 prev_permutation(_BIter, _BIter);
483 template<
typename _BIter,
typename _Compare>
485 prev_permutation(_BIter, _BIter, _Compare);
487 template<
typename _RAIter>
489 push_heap(_RAIter, _RAIter);
491 template<
typename _RAIter,
typename _Compare>
493 push_heap(_RAIter, _RAIter, _Compare);
497 template<
typename _FIter,
typename _Tp>
499 remove(_FIter, _FIter,
const _Tp&);
501 template<
typename _FIter,
typename _Predicate>
503 remove_if(_FIter, _FIter, _Predicate);
505 template<
typename _IIter,
typename _OIter,
typename _Tp>
507 remove_copy(_IIter, _IIter, _OIter,
const _Tp&);
509 template<
typename _IIter,
typename _OIter,
typename _Predicate>
511 remove_copy_if(_IIter, _IIter, _OIter, _Predicate);
515 template<
typename _IIter,
typename _OIter,
typename _Tp>
517 replace_copy(_IIter, _IIter, _OIter,
const _Tp&,
const _Tp&);
519 template<
typename _Iter,
typename _OIter,
typename _Predicate,
typename _Tp>
521 replace_copy_if(_Iter, _Iter, _OIter, _Predicate,
const _Tp&);
525 template<
typename _BIter>
527 reverse(_BIter, _BIter);
529 template<
typename _BIter,
typename _OIter>
531 reverse_copy(_BIter, _BIter, _OIter);
535 template<
typename _FIter>
537 rotate(_FIter, _FIter, _FIter);
540 template<
typename _FIter,
typename _OIter>
542 rotate_copy(_FIter, _FIter, _FIter, _OIter);
551 #if (__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99_STDINT_TR1) 552 template<
typename _RAIter,
typename _UGenerator>
554 shuffle(_RAIter, _RAIter, _UGenerator&&);
557 template<
typename _RAIter>
559 sort_heap(_RAIter, _RAIter);
561 template<
typename _RAIter,
typename _Compare>
563 sort_heap(_RAIter, _RAIter, _Compare);
565 template<
typename _BIter,
typename _Predicate>
567 stable_partition(_BIter, _BIter, _Predicate);
569 template<
typename _Tp>
572 #if __cplusplus >= 201103L 573 noexcept(__and_<is_nothrow_move_constructible<_Tp>,
574 is_nothrow_move_assignable<_Tp>>::value)
578 template<
typename _Tp,
size_t _Nm>
580 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
581 #if __cplusplus >= 201103L 582 noexcept(noexcept(swap(*__a, *__b)))
586 template<
typename _FIter1,
typename _FIter2>
588 swap_ranges(_FIter1, _FIter1, _FIter2);
592 template<
typename _FIter>
594 unique(_FIter, _FIter);
596 template<
typename _FIter,
typename _BinaryPredicate>
598 unique(_FIter, _FIter, _BinaryPredicate);
602 template<
typename _FIter,
typename _Tp>
604 upper_bound(_FIter, _FIter,
const _Tp&);
606 template<
typename _FIter,
typename _Tp,
typename _Compare>
608 upper_bound(_FIter, _FIter,
const _Tp&, _Compare);
610 _GLIBCXX_END_NAMESPACE_VERSION
612 _GLIBCXX_BEGIN_NAMESPACE_ALGO
614 template<
typename _FIter>
616 adjacent_find(_FIter, _FIter);
618 template<
typename _FIter,
typename _BinaryPredicate>
620 adjacent_find(_FIter, _FIter, _BinaryPredicate);
622 template<
typename _IIter,
typename _Tp>
623 typename iterator_traits<_IIter>::difference_type
624 count(_IIter, _IIter,
const _Tp&);
626 template<
typename _IIter,
typename _Predicate>
627 typename iterator_traits<_IIter>::difference_type
628 count_if(_IIter, _IIter, _Predicate);
630 template<
typename _IIter1,
typename _IIter2>
632 equal(_IIter1, _IIter1, _IIter2);
634 template<
typename _IIter1,
typename _IIter2,
typename _BinaryPredicate>
636 equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
638 template<
typename _IIter,
typename _Tp>
640 find(_IIter, _IIter,
const _Tp&);
642 template<
typename _FIter1,
typename _FIter2>
644 find_first_of(_FIter1, _FIter1, _FIter2, _FIter2);
646 template<
typename _FIter1,
typename _FIter2,
typename _BinaryPredicate>
648 find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
650 template<
typename _IIter,
typename _Predicate>
652 find_if(_IIter, _IIter, _Predicate);
654 template<
typename _IIter,
typename _Funct>
656 for_each(_IIter, _IIter, _Funct);
658 template<
typename _FIter,
typename _Generator>
660 generate(_FIter, _FIter, _Generator);
662 template<
typename _OIter,
typename _Size,
typename _Generator>
664 generate_n(_OIter, _Size, _Generator);
666 template<
typename _IIter1,
typename _IIter2>
668 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
670 template<
typename _IIter1,
typename _IIter2,
typename _Compare>
672 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
674 template<
typename _FIter>
677 max_element(_FIter, _FIter);
679 template<
typename _FIter,
typename _Compare>
682 max_element(_FIter, _FIter, _Compare);
684 template<
typename _IIter1,
typename _IIter2,
typename _OIter>
686 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
688 template<
typename _IIter1,
typename _IIter2,
typename _OIter,
691 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
693 template<
typename _FIter>
696 min_element(_FIter, _FIter);
698 template<
typename _FIter,
typename _Compare>
701 min_element(_FIter, _FIter, _Compare);
703 template<
typename _IIter1,
typename _IIter2>
704 pair<_IIter1, _IIter2>
705 mismatch(_IIter1, _IIter1, _IIter2);
707 template<
typename _IIter1,
typename _IIter2,
typename _BinaryPredicate>
708 pair<_IIter1, _IIter2>
709 mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
711 template<
typename _RAIter>
713 nth_element(_RAIter, _RAIter, _RAIter);
715 template<
typename _RAIter,
typename _Compare>
717 nth_element(_RAIter, _RAIter, _RAIter, _Compare);
719 template<
typename _RAIter>
721 partial_sort(_RAIter, _RAIter, _RAIter);
723 template<
typename _RAIter,
typename _Compare>
725 partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
727 template<
typename _BIter,
typename _Predicate>
729 partition(_BIter, _BIter, _Predicate);
731 template<
typename _RAIter>
733 random_shuffle(_RAIter, _RAIter);
735 template<
typename _RAIter,
typename _Generator>
737 random_shuffle(_RAIter, _RAIter,
738 #
if __cplusplus >= 201103L
744 template<
typename _FIter,
typename _Tp>
746 replace(_FIter, _FIter,
const _Tp&,
const _Tp&);
748 template<
typename _FIter,
typename _Predicate,
typename _Tp>
750 replace_if(_FIter, _FIter, _Predicate,
const _Tp&);
752 template<
typename _FIter1,
typename _FIter2>
754 search(_FIter1, _FIter1, _FIter2, _FIter2);
756 template<
typename _FIter1,
typename _FIter2,
typename _BinaryPredicate>
758 search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
760 template<
typename _FIter,
typename _Size,
typename _Tp>
762 search_n(_FIter, _FIter, _Size,
const _Tp&);
764 template<
typename _FIter,
typename _Size,
typename _Tp,
765 typename _BinaryPredicate>
767 search_n(_FIter, _FIter, _Size,
const _Tp&, _BinaryPredicate);
769 template<
typename _IIter1,
typename _IIter2,
typename _OIter>
771 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
773 template<
typename _IIter1,
typename _IIter2,
typename _OIter,
776 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
778 template<
typename _IIter1,
typename _IIter2,
typename _OIter>
780 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
782 template<
typename _IIter1,
typename _IIter2,
typename _OIter,
785 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
787 template<
typename _IIter1,
typename _IIter2,
typename _OIter>
789 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
791 template<
typename _IIter1,
typename _IIter2,
typename _OIter,
794 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2,
797 template<
typename _IIter1,
typename _IIter2,
typename _OIter>
799 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
801 template<
typename _IIter1,
typename _IIter2,
typename _OIter,
804 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
806 template<
typename _RAIter>
808 sort(_RAIter, _RAIter);
810 template<
typename _RAIter,
typename _Compare>
812 sort(_RAIter, _RAIter, _Compare);
814 template<
typename _RAIter>
816 stable_sort(_RAIter, _RAIter);
818 template<
typename _RAIter,
typename _Compare>
820 stable_sort(_RAIter, _RAIter, _Compare);
822 template<
typename _IIter,
typename _OIter,
typename _UnaryOperation>
824 transform(_IIter, _IIter, _OIter, _UnaryOperation);
826 template<
typename _IIter1,
typename _IIter2,
typename _OIter,
827 typename _BinaryOperation>
829 transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation);
831 template<
typename _IIter,
typename _OIter>
833 unique_copy(_IIter, _IIter, _OIter);
835 template<
typename _IIter,
typename _OIter,
typename _BinaryPredicate>
837 unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate);
839 _GLIBCXX_END_NAMESPACE_ALGO
842 #ifdef _GLIBCXX_PARALLEL
_GLIBCXX14_CONSTEXPR const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
_GLIBCXX14_CONSTEXPR const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
_GLIBCXX14_CONSTEXPR pair< const _Tp &, const _Tp & > minmax(const _Tp &, const _Tp &)
Determines min and max at once as an ordered pair.
ISO C++ entities toplevel namespace is std.