// -*- c++ -*- // From CD2, Dec 96 Header synopsis // Fwd: forward iterator // Inp: input iterator // subclause _lib.alg.nonmodifying_, non-modifying sequence operations: template Function for_each(Inp first, Inp last, Function f); Inp find(Inp first, Inp last, const T& value); Inp find_if(Inp first, Inp last, Predicate pred); Fwd1 find_end(Fwd1 first1, Fwd1 last1, Fwd2 first2, Fwd2 last2); Fwd1 find_end(Fwd1 first1, Fwd1 last1, Fwd2 first2, Fwd2 last2, BinaryPredicate pred); Fwd1 find_first_of(Fwd1 first1, Fwd1 last1, Fwd2 first2, Fwd2 last2); Fwd1 find_first_of(Fwd1 first1, Fwd1 last1, Fwd2 first2, Fwd2 last2, BinaryPredicate pred); Fwd adjacent_find(Fwd first, Fwd last); Fwd adjacent_find(Fwd first, Fwd last, BinaryPredicate pred); difference_type count(Inp first, Inp last, const T& value); difference_type count_if(Inp first, Inp last, Predicate pred); pair mismatch(Inp1 first1, Inp1 last1, Inp2 first2); pair mismatch(Inp1 first1, Inp1 last1, Inp2 first2, BinaryPredicate pred); bool equal(Inp1 first1, Inp1 last1, Inp2 first2); bool equal(Inp1 first1, Inp1 last1, Inp2 first2, BinaryPredicate pred); Fwd1 search(Fwd1 first1, Fwd1 last1, Fwd2 first2, Fwd2 last2); Fwd1 search(Fwd1 first1, Fwd1 last1, Fwd2 first2, Fwd2 last2, BinaryPredicate pred); Fwd search_n(Fwd first, Fwd last, Size count, const T& value); Fwd1 search_n(Fwd first, Fwd last, Size count, const T& value, BinaryPredicate pred); // subclause _lib.alg.modifying.operations_, modifying sequence operations: // _lib.alg.copy_, copy: template OutputIterator copy(Inp first, Inp last, OutputIterator result); template BidirectionalIterator2 copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last, BidirectionalIterator2 result); // _lib.alg.swap_, swap: template void swap(T& a, T& b); template Fwd2 swap_ranges(Fwd1 first1, Fwd1 last1, Fwd2 first2); template void iter_swap(Fwd1 a, Fwd2 b); template OutputIterator transform(Inp first, Inp last, OutputIterator result, UnaryOperation op); template OutputIterator transform(Inp1 first1, Inp1 last1, Inp2 first2, OutputIterator result, BinaryOperation binary_op); template void replace(Fwd first, Fwd last, const T& old_value, const T& new_value); template void replace_if(Fwd first, Fwd last, Predicate pred, const T& new_value); template OutputIterator replace_copy(Inp first, Inp last, OutputIterator result, const T& old_value, const T& new_value); template OutputIterator replace_copy_if(Iterator first, Iterator last, OutputIterator result, Predicate pred, const T& new_value); template void fill(Fwd first, Fwd last, const T& value); template void fill_n(OutputIterator first, Size n, const T& value); template void generate(Fwd first, Fwd last, Generator gen); template void generate_n(OutputIterator first, Size n, Generator gen); template Fwd remove(Fwd first, Fwd last, const T& value); template Fwd remove_if(Fwd first, Fwd last, Predicate pred); template OutputIterator remove_copy(Inp first, Inp last, OutputIterator result, const T& value); template OutputIterator remove_copy_if(Inp first, Inp last, OutputIterator result, Predicate pred); template Fwd unique(Fwd first, Fwd last); template Fwd unique(Fwd first, Fwd last, BinaryPredicate pred); template OutputIterator unique_copy(Inp first, Inp last, OutputIterator result); template OutputIterator unique_copy(Inp first, Inp last, OutputIterator result, BinaryPredicate pred); template void reverse(BidirectionalIterator first, BidirectionalIterator last); template OutputIterator reverse_copy(BidirectionalIterator first, BidirectionalIterator last, OutputIterator result); template void rotate(Fwd first, Fwd middle, Fwd last); template OutputIterator rotate_copy(Fwd first, Fwd middle, Fwd last, OutputIterator result); template void random_shuffle(RandomAccessIterator first, RandomAccessIterator last); template void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, RandomNumberGenerator& rand); // _lib.alg.partitions_, partitions: template BidirectionalIterator partition(BidirectionalIterator first, BidirectionalIterator last, Predicate pred); template BidirectionalIterator stable_partition(BidirectionalIterator first, BidirectionalIterator last, Predicate pred); // subclause _lib.alg.sorting_, sorting and related operations: // _lib.alg.sort_, sorting: template void sort(RandomAccessIterator first, RandomAccessIterator last); template void sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp); template void stable_sort(RandomAccessIterator first, RandomAccessIterator last); template void stable_sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp); template void partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last); template void partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last, Compare comp); template RandomAccessIterator partial_sort_copy(Inp first, Inp last, RandomAccessIterator result_first, RandomAccessIterator result_last); template RandomAccessIterator partial_sort_copy(Inp first, Inp last, RandomAccessIterator result_first, RandomAccessIterator result_last, Compare comp); template void nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last); template void nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last, Compare comp); // _lib.alg.binary.search_, binary search: template Fwd lower_bound(Fwd first, Fwd last, const T& value); template Fwd lower_bound(Fwd first, Fwd last, const T& value, Compare comp); template Fwd upper_bound(Fwd first, Fwd last, const T& value); template Fwd upper_bound(Fwd first, Fwd last, const T& value, Compare comp); template pair equal_range(Fwd first, Fwd last, const T& value); template pair equal_range(Fwd first, Fwd last, const T& value, Compare comp); template bool binary_search(Fwd first, Fwd last, const T& value); template bool binary_search(Fwd first, Fwd last, const T& value, Compare comp); // _lib.alg.merge_, merge: template OutputIterator merge(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2, OutputIterator result); template OutputIterator merge(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2, OutputIterator result, Compare comp); template void inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last); template void inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last, Compare comp); // _lib.alg.set.operations_, set operations: template bool includes(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2); template bool includes(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2, Compare comp); template OutputIterator set_union(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2, OutputIterator result); template OutputIterator set_union(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2, OutputIterator result, Compare comp); template OutputIterator set_intersection(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2, OutputIterator result); template OutputIterator set_intersection(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2, OutputIterator result, Compare comp); template OutputIterator set_difference(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2, OutputIterator result); template OutputIterator set_difference(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2, OutputIterator result, Compare comp); template OutputIterator set_symmetric_difference(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2, OutputIterator result); template OutputIterator set_symmetric_difference(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2, OutputIterator result, Compare comp); // _lib.alg.heap.operations_, heap operations: template void push_heap(RandomAccessIterator first, RandomAccessIterator last); template void push_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); template void pop_heap(RandomAccessIterator first, RandomAccessIterator last); template void pop_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); template void make_heap(RandomAccessIterator first, RandomAccessIterator last); template void make_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); template void sort_heap(RandomAccessIterator first, RandomAccessIterator last); template void sort_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); // _lib.alg.min.max_, minimum and maximum: template const T& min(const T& a, const T& b); template const T& min(const T& a, const T& b, Compare comp); template const T& max(const T& a, const T& b); template const T& max(const T& a, const T& b, Compare comp); template Fwd min_element(Fwd first, Fwd last); template Fwd min_element(Fwd first, Fwd last, Compare comp); template Fwd max_element(Fwd first, Fwd last); template Fwd max_element(Fwd first, Fwd last, Compare comp); template bool lexicographical_compare(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2); template bool lexicographical_compare(Inp1 first1, Inp1 last1, Inp2 first2, Inp2 last2, Compare comp); // _lib.alg.permutation.generators_, permutations template bool next_permutation(BidirectionalIterator first, BidirectionalIterator last); template bool next_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); template bool prev_permutation(BidirectionalIterator first, BidirectionalIterator last); template bool prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp);