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 #if __cplusplus < 201103L 572 template<
typename _Tp,
size_t _Nm>
574 swap(_Tp& __a, _Tp& __b);
576 template<
typename _Tp,
size_t _Nm>
578 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]);
581 template<
typename _FIter1,
typename _FIter2>
583 swap_ranges(_FIter1, _FIter1, _FIter2);
587 template<
typename _FIter>
589 unique(_FIter, _FIter);
591 template<
typename _FIter,
typename _BinaryPredicate>
593 unique(_FIter, _FIter, _BinaryPredicate);
597 template<
typename _FIter,
typename _Tp>
599 upper_bound(_FIter, _FIter,
const _Tp&);
601 template<
typename _FIter,
typename _Tp,
typename _Compare>
603 upper_bound(_FIter, _FIter,
const _Tp&, _Compare);
605 _GLIBCXX_END_NAMESPACE_VERSION
607 _GLIBCXX_BEGIN_NAMESPACE_ALGO
609 template<
typename _FIter>
611 adjacent_find(_FIter, _FIter);
613 template<
typename _FIter,
typename _BinaryPredicate>
615 adjacent_find(_FIter, _FIter, _BinaryPredicate);
617 template<
typename _IIter,
typename _Tp>
618 typename iterator_traits<_IIter>::difference_type
619 count(_IIter, _IIter,
const _Tp&);
621 template<
typename _IIter,
typename _Predicate>
622 typename iterator_traits<_IIter>::difference_type
623 count_if(_IIter, _IIter, _Predicate);
625 template<
typename _IIter1,
typename _IIter2>
627 equal(_IIter1, _IIter1, _IIter2);
629 template<
typename _IIter1,
typename _IIter2,
typename _BinaryPredicate>
631 equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
633 template<
typename _IIter,
typename _Tp>
635 find(_IIter, _IIter,
const _Tp&);
637 template<
typename _FIter1,
typename _FIter2>
639 find_first_of(_FIter1, _FIter1, _FIter2, _FIter2);
641 template<
typename _FIter1,
typename _FIter2,
typename _BinaryPredicate>
643 find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
645 template<
typename _IIter,
typename _Predicate>
647 find_if(_IIter, _IIter, _Predicate);
649 template<
typename _IIter,
typename _Funct>
651 for_each(_IIter, _IIter, _Funct);
653 template<
typename _FIter,
typename _Generator>
655 generate(_FIter, _FIter, _Generator);
657 template<
typename _OIter,
typename _Size,
typename _Generator>
659 generate_n(_OIter, _Size, _Generator);
661 template<
typename _IIter1,
typename _IIter2>
663 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
665 template<
typename _IIter1,
typename _IIter2,
typename _Compare>
667 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
669 template<
typename _FIter>
672 max_element(_FIter, _FIter);
674 template<
typename _FIter,
typename _Compare>
677 max_element(_FIter, _FIter, _Compare);
679 template<
typename _IIter1,
typename _IIter2,
typename _OIter>
681 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
683 template<
typename _IIter1,
typename _IIter2,
typename _OIter,
686 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
688 template<
typename _FIter>
691 min_element(_FIter, _FIter);
693 template<
typename _FIter,
typename _Compare>
696 min_element(_FIter, _FIter, _Compare);
698 template<
typename _IIter1,
typename _IIter2>
699 pair<_IIter1, _IIter2>
700 mismatch(_IIter1, _IIter1, _IIter2);
702 template<
typename _IIter1,
typename _IIter2,
typename _BinaryPredicate>
703 pair<_IIter1, _IIter2>
704 mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
706 template<
typename _RAIter>
708 nth_element(_RAIter, _RAIter, _RAIter);
710 template<
typename _RAIter,
typename _Compare>
712 nth_element(_RAIter, _RAIter, _RAIter, _Compare);
714 template<
typename _RAIter>
716 partial_sort(_RAIter, _RAIter, _RAIter);
718 template<
typename _RAIter,
typename _Compare>
720 partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
722 template<
typename _BIter,
typename _Predicate>
724 partition(_BIter, _BIter, _Predicate);
726 template<
typename _RAIter>
728 random_shuffle(_RAIter, _RAIter);
730 template<
typename _RAIter,
typename _Generator>
732 random_shuffle(_RAIter, _RAIter,
733 #
if __cplusplus >= 201103L
739 template<
typename _FIter,
typename _Tp>
741 replace(_FIter, _FIter,
const _Tp&,
const _Tp&);
743 template<
typename _FIter,
typename _Predicate,
typename _Tp>
745 replace_if(_FIter, _FIter, _Predicate,
const _Tp&);
747 template<
typename _FIter1,
typename _FIter2>
749 search(_FIter1, _FIter1, _FIter2, _FIter2);
751 template<
typename _FIter1,
typename _FIter2,
typename _BinaryPredicate>
753 search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
755 template<
typename _FIter,
typename _Size,
typename _Tp>
757 search_n(_FIter, _FIter, _Size,
const _Tp&);
759 template<
typename _FIter,
typename _Size,
typename _Tp,
760 typename _BinaryPredicate>
762 search_n(_FIter, _FIter, _Size,
const _Tp&, _BinaryPredicate);
764 template<
typename _IIter1,
typename _IIter2,
typename _OIter>
766 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
768 template<
typename _IIter1,
typename _IIter2,
typename _OIter,
771 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
773 template<
typename _IIter1,
typename _IIter2,
typename _OIter>
775 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
777 template<
typename _IIter1,
typename _IIter2,
typename _OIter,
780 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
782 template<
typename _IIter1,
typename _IIter2,
typename _OIter>
784 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
786 template<
typename _IIter1,
typename _IIter2,
typename _OIter,
789 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2,
792 template<
typename _IIter1,
typename _IIter2,
typename _OIter>
794 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
796 template<
typename _IIter1,
typename _IIter2,
typename _OIter,
799 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
801 template<
typename _RAIter>
803 sort(_RAIter, _RAIter);
805 template<
typename _RAIter,
typename _Compare>
807 sort(_RAIter, _RAIter, _Compare);
809 template<
typename _RAIter>
811 stable_sort(_RAIter, _RAIter);
813 template<
typename _RAIter,
typename _Compare>
815 stable_sort(_RAIter, _RAIter, _Compare);
817 template<
typename _IIter,
typename _OIter,
typename _UnaryOperation>
819 transform(_IIter, _IIter, _OIter, _UnaryOperation);
821 template<
typename _IIter1,
typename _IIter2,
typename _OIter,
822 typename _BinaryOperation>
824 transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation);
826 template<
typename _IIter,
typename _OIter>
828 unique_copy(_IIter, _IIter, _OIter);
830 template<
typename _IIter,
typename _OIter,
typename _BinaryPredicate>
832 unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate);
834 _GLIBCXX_END_NAMESPACE_ALGO
837 #ifdef _GLIBCXX_PARALLEL
_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.
_GLIBCXX14_CONSTEXPR const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
ISO C++ entities toplevel namespace is std.