|
template<typename InputIt, typename OutputIt> |
constexpr auto | copy (InputIt first, InputIt last, OutputIt destination) -> OutputIt |
| Copies the elements in the range, defined by [first, last) , to another range beginning at destination.
|
|
template<typename BidirIt1, typename BidirIt2> |
constexpr auto | copy_backward (BidirIt1 first, BidirIt1 last, BidirIt2 dLast) -> BidirIt2 |
| Copies the elements from the range, defined by [first, last) , to another range ending at dLast . The elements are copied in reverse order (the last element is copied first), but their relative order is preserved.
|
|
template<typename InIt, typename OutIt, typename Pred> |
constexpr auto | copy_if (InIt first, InIt last, OutIt dFirst, Pred pred) -> OutIt |
| Copies the elements in the range, defined by [first, last) , to another range beginning at destination.
|
|
template<typename InputIt, typename Size, typename OutputIt> |
constexpr auto | copy_n (InputIt first, Size count, OutputIt result) -> OutputIt |
| Copies exactly count values from the range beginning at first to the range beginning at result. Formally, for each integer 0 <= i < count , performs *(result + i) = *(first + i) . Overlap of ranges is formally permitted, but leads to unpredictable ordering of the results.
|
|
template<typename InputIt, typename T> |
constexpr auto | count (InputIt first, InputIt last, T const &value) -> typename iterator_traits< InputIt >::difference_type |
| Returns the number of elements in the range [first, last) satisfying specific criteria. Counts the elements that are equal to value.
|
|
template<typename InputIt, typename Predicate> |
constexpr auto | count_if (InputIt first, InputIt last, Predicate p) -> typename iterator_traits< InputIt >::difference_type |
| Returns the number of elements in the range [first, last) satisfying specific criteria. Counts elements for which predicate p returns true.
|
|
template<typename InputIt1, typename InputIt2> |
constexpr auto | equal (InputIt1 first1, InputIt1 last1, InputIt2 first2) -> bool |
|
template<typename InputIt1, typename InputIt2> |
constexpr auto | equal (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2) -> bool |
|
template<typename InputIt1, typename InputIt2, typename Predicate> |
constexpr auto | equal (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, Predicate p) -> bool |
|
template<typename InputIt1, typename InputIt2, typename Predicate> |
constexpr auto | equal (InputIt1 first1, InputIt1 last1, InputIt2 first2, Predicate p) -> bool |
| Returns true if the range [first1, last1) is equal to the range [first2, first2 + (last1 - first1)) , and false otherwise.
|
|
template<typename ForwardIt, typename T> |
constexpr auto | equal_range (ForwardIt first, ForwardIt last, T const &value) -> pair< ForwardIt, ForwardIt > |
|
template<typename ForwardIt, typename T, typename Compare> |
constexpr auto | equal_range (ForwardIt first, ForwardIt last, T const &value, Compare comp) -> pair< ForwardIt, ForwardIt > |
| Returns a range containing all elements equivalent to value in the range [first, last) .
|
|
template<typename RandomIt> |
constexpr auto | exchange_sort (RandomIt first, RandomIt last) -> void |
| Sorts the elements in the range [first, last) in non-descending order.
|
|
template<typename RandomIt, typename Compare> |
constexpr auto | exchange_sort (RandomIt first, RandomIt last, Compare comp) -> void |
| Sorts the elements in the range [first, last) in non-descending order.
|
|
template<typename ForwardIt, typename T> |
constexpr auto | fill (ForwardIt first, ForwardIt last, T const &value) -> void |
| Assigns the given value to the elements in the range [first, last) .
|
|
template<typename OutputIt, typename Size, typename T> |
constexpr auto | fill_n (OutputIt first, Size count, T const &value) -> OutputIt |
| Assigns the given value to the first count elements in the range beginning at first if count > 0 . Does nothing otherwise.
|
|
template<typename InputIt, typename T> |
constexpr auto | find (InputIt first, InputIt last, T const &value) noexcept -> InputIt |
| Searches for an element equal to value.
|
|
template<typename ForwardIt1, typename ForwardIt2> |
constexpr auto | find_end (ForwardIt1 first, ForwardIt1 last, ForwardIt2 sFirst, ForwardIt2 sLast) -> ForwardIt1 |
|
template<typename ForwardIt1, typename ForwardIt2, typename Predicate> |
constexpr auto | find_end (ForwardIt1 first, ForwardIt1 last, ForwardIt2 sFirst, ForwardIt2 sLast, Predicate p) -> ForwardIt1 |
| Searches for the last occurrence of the sequence [sFirst, sLast) in the range [first, last) . Elements are compared using the given binary predicate p.
|
|
template<typename InputIt, typename ForwardIt> |
constexpr auto | find_first_of (InputIt first, InputIt last, ForwardIt sFirst, ForwardIt sLast) -> InputIt |
| Searches the range [first, last) for any of the elements in the range [sFirst, sLast).
|
|
template<typename InputIt, typename ForwardIt, typename Predicate> |
constexpr auto | find_first_of (InputIt first, InputIt last, ForwardIt sFirst, ForwardIt sLast, Predicate pred) -> InputIt |
| Searches the range [first, last) for any of the elements in the range [sFirst, sLast). Elements are compared using the given binary predicate pred.
|
|
template<typename InputIt, typename Predicate> |
constexpr auto | find_if (InputIt first, InputIt last, Predicate pred) noexcept -> InputIt |
| Searches for an element for which predicate p returns true.
|
|
template<typename InputIt, typename Predicate> |
constexpr auto | find_if_not (InputIt first, InputIt last, Predicate pred) noexcept -> InputIt |
| Searches for an element for which predicate q returns false.
|
|
template<typename InputIt, typename UnaryFunc> |
constexpr auto | for_each (InputIt first, InputIt last, UnaryFunc f) noexcept -> UnaryFunc |
| Applies the given function object f to the result of dereferencing every iterator in the range [first, last) in order.
|
|
template<typename InputIt, typename Size, typename UnaryFunc> |
constexpr auto | for_each_n (InputIt first, Size n, UnaryFunc f) noexcept -> InputIt |
| Applies the given function object f to the result of dereferencing every iterator in the range [first, first + n] in order.
|
|
template<typename ForwardIt, typename Generator> |
constexpr auto | generate (ForwardIt first, ForwardIt last, Generator g) -> void |
| Assigns each element in range [first, last) a value generated by the given function object g.
|
|
template<typename OutputIt, typename SizeT, typename Generator> |
constexpr auto | generate_n (OutputIt first, SizeT count, Generator g) -> OutputIt |
| Assigns values, generated by given function object g , to the first count elements in the range beginning at first , if count > 0 . Does nothing otherwise.
|
|
template<typename BidirIt> |
constexpr auto | gnome_sort (BidirIt first, BidirIt last) -> void |
| Sorts the elements in the range [first, last) in non-descending order.
|
|
template<typename BidirIt, typename Compare> |
constexpr auto | gnome_sort (BidirIt first, BidirIt last, Compare comp) -> void |
| Sorts the elements in the range [first, last) in non-descending order.
|
|
template<typename InputIt1, typename InputIt2> |
constexpr auto | includes (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2) -> bool |
|
template<typename InputIt1, typename InputIt2, typename Compare> |
constexpr auto | includes (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, Compare comp) -> bool |
| Returns true if the sorted range [first2, last2) is a subsequence of the sorted range [first1, last1) . Both ranges must be sorted.
|
|
template<typename BidirIt, typename Compare> |
constexpr auto | inplace_merge (BidirIt begin, BidirIt mid, BidirIt end, Compare comp) -> void |
| Merges two consecutive sorted ranges [first, middle) and [middle, last) into one sorted range [first, last).
|
|
template<typename BidirIt> |
constexpr auto | inplace_merge (BidirIt first, BidirIt mid, BidirIt last) -> void |
|
template<typename RandomIt> |
constexpr auto | insertion_sort (RandomIt first, RandomIt last) -> void |
|
template<typename RandomIt, typename Compare> |
constexpr auto | insertion_sort (RandomIt first, RandomIt last, Compare comp) -> void |
| Sorts the elements in the range [first, last) in non-descending order. The order of equal elements is guaranteed to be preserved.
|
|
template<typename InputIt, typename Predicate> |
constexpr auto | is_partitioned (InputIt first, InputIt last, Predicate p) -> bool |
| Returns true if all elements in the range [first, last) that satisfy the predicate p appear before all elements that don't. Also returns true if the range is empty.
|
|
template<typename ForwardIt1, typename ForwardIt2> |
constexpr auto | is_permutation (ForwardIt1 first, ForwardIt1 last, ForwardIt2 first2) -> bool |
| Returns true if there exists a permutation of the elements in the range [first1, last1) that makes that range equal to the range [first2, last2) , where last2 denotes first2 + (last1 - first1) if it was not given.
|
|
template<typename ForwardIt1, typename ForwardIt2> |
constexpr auto | is_permutation (ForwardIt1 first1, ForwardIt1 last1, ForwardIt2 first2, ForwardIt2 last2) -> bool |
|
template<typename ForwardIt> |
constexpr auto | is_sorted (ForwardIt first, ForwardIt last) -> bool |
| Checks if the elements in range [first, last) are sorted in non-descending order.
|
|
template<typename ForwardIt, typename Compare> |
constexpr auto | is_sorted (ForwardIt first, ForwardIt last, Compare comp) -> bool |
|
template<typename ForwardIt> |
constexpr auto | is_sorted_until (ForwardIt first, ForwardIt last) -> ForwardIt |
| Examines the range [first, last) and finds the largest range beginning at first in which the elements are sorted in non-descending order.
|
|
template<typename ForwardIt, typename Compare> |
constexpr auto | is_sorted_until (ForwardIt first, ForwardIt last, Compare comp) -> ForwardIt |
|
template<typename ForwardIt1, typename ForwardIt2> |
constexpr auto | iter_swap (ForwardIt1 a, ForwardIt2 b) -> void |
| Swaps the values of the elements the given iterators are pointing to.
|
|
template<typename InputIt1, typename InputIt2> |
constexpr auto | lexicographical_compare (InputIt1 f1, InputIt1 l1, InputIt2 f2, InputIt2 l2) -> bool |
|
template<typename InputIt1, typename InputIt2, typename Compare> |
constexpr auto | lexicographical_compare (InputIt1 f1, InputIt1 l1, InputIt2 f2, InputIt2 l2, Compare comp) -> bool |
| Checks if the first range [f1, l1) is lexicographically less than the second range [f2, l2) .
|
|
template<typename ForwardIt, typename T> |
constexpr auto | lower_bound (ForwardIt first, ForwardIt last, T const &value) noexcept -> ForwardIt |
|
template<typename ForwardIt, typename T, typename Compare> |
constexpr auto | lower_bound (ForwardIt first, ForwardIt last, T const &value, Compare comp) noexcept -> ForwardIt |
| Returns an iterator pointing to the first element in the range [first, last) that is not less than (i.e. greater or equal to) value, or last if no such element is found.
|
|
template<typename Type> |
constexpr auto | max (Type const &a, Type const &b) noexcept -> Type const & |
| Returns the greater of a and b.
|
|
template<typename Type, typename Compare> |
constexpr auto | max (Type const &a, Type const &b, Compare comp) noexcept -> Type const & |
| Returns the greater of a and b, using a compare function.
|
|
template<typename ForwardIt> |
constexpr auto | max_element (ForwardIt first, ForwardIt last) noexcept -> ForwardIt |
| Finds the greatest element in the range [first, last) . Elements are compared using operator<.
|
|
template<typename ForwardIt, typename Compare> |
constexpr auto | max_element (ForwardIt first, ForwardIt last, Compare comp) -> ForwardIt |
| Finds the greatest element in the range [first, last) . Elements are compared using the given binary comparison function comp.
|
|
template<typename InputIt1, typename InputIt2, typename OutputIt> |
constexpr auto | merge (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination) -> OutputIt |
|
template<typename InputIt1, typename InputIt2, typename OutputIt, typename Compare> |
constexpr auto | merge (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination, Compare comp) -> OutputIt |
| Merges two sorted ranges [first1, last1) and [first2, last2) into one sorted range beginning at destination .
|
|
template<typename Type> |
constexpr auto | min (Type const &a, Type const &b) noexcept -> Type const & |
| Returns the smaller of a and b.
|
|
template<typename Type, typename Compare> |
constexpr auto | min (Type const &a, Type const &b, Compare comp) noexcept -> Type const & |
| Returns the smaller of a and b, using a compare function.
|
|
template<typename ForwardIt> |
constexpr auto | min_element (ForwardIt first, ForwardIt last) noexcept -> ForwardIt |
| Finds the smallest element in the range [first, last) . Elements are compared using operator<.
|
|
template<typename ForwardIt, typename Compare> |
constexpr auto | min_element (ForwardIt first, ForwardIt last, Compare comp) -> ForwardIt |
| Finds the smallest element in the range [first, last) . Elements are compared using the given binary comparison function comp.
|
|
template<typename T> |
constexpr auto | minmax (T const &a, T const &b) -> pair< T const &, T const & > |
| Returns the lowest and the greatest of the given values.
|
|
template<typename T, typename Compare> |
constexpr auto | minmax (T const &a, T const &b, Compare comp) -> pair< T const &, T const & > |
| Returns the lowest and the greatest of the given values.
|
|
template<typename ForwardIt> |
constexpr auto | minmax_element (ForwardIt first, ForwardIt last) -> pair< ForwardIt, ForwardIt > |
| Finds the smallest and greatest element in the range [first, last) .
|
|
template<typename ForwardIt, typename Compare> |
constexpr auto | minmax_element (ForwardIt first, ForwardIt last, Compare comp) -> pair< ForwardIt, ForwardIt > |
| Finds the smallest and greatest element in the range [first, last) .
|
|
template<typename InputIt1, typename InputIt2, typename Predicate> |
constexpr auto | mismatch (InputIt1 first1, InputIt1 last1, InputIt2 first2, Predicate pred) -> pair< InputIt1, InputIt2 > |
| Returns the first mismatching pair of elements from two ranges: one defined by [first1, last1) and another defined by [first2,last2). If last2 is not provided (overloads (1-4)), it denotes first2 + (last1 - first1). Elements are compared using the given binary predicate pred.
|
|
template<typename InputIt, typename OutputIt> |
constexpr auto | move (InputIt first, InputIt last, OutputIt destination) -> OutputIt |
| Moves the elements in the range [first, last) , to another range beginning at destination, starting from first and proceeding to last - 1 . After this operation the elements in the moved-from range will still contain valid values of the appropriate type, but not necessarily the same values as before the move.
|
|
template<typename BidirIt1, typename BidirIt2> |
constexpr auto | move_backward (BidirIt1 first, BidirIt1 last, BidirIt2 destination) -> BidirIt2 |
| Moves the elements from the range [first, last) , to another range ending at destination. The elements are moved in reverse order (the last element is moved first), but their relative order is preserved.
|
|
template<typename InputIt, typename Predicate> |
constexpr auto | none_of (InputIt first, InputIt last, Predicate p) -> bool |
| Checks if unary predicate p returns true for no elements in the range [first, last) .
|
|
template<typename RandomIt, typename Compare> |
constexpr auto | nth_element (RandomIt first, RandomIt nth, RandomIt last, Compare comp) -> void |
| nth_element is a partial sorting algorithm that rearranges elements in [first, last) such that:
|
|
template<typename RandomIt, typename Compare> |
constexpr auto | partial_sort (RandomIt first, RandomIt middle, RandomIt last, Compare comp) -> void |
| Rearranges elements such that the range [first, middle) contains the sorted middle - first smallest elements in the range [first, last) . The order of equal elements is not guaranteed to be preserved. The order of the remaining elements in the range [middle, last) is unspecified.
|
|
template<typename ForwardIt, typename Predicate> |
constexpr auto | partition (ForwardIt first, ForwardIt last, Predicate p) -> ForwardIt |
| Reorders the elements in the range [first, last) in such a way that all elements for which the predicate p returns true precede the elements for which predicate p returns false. Relative order of the elements is not preserved.
|
|
template<typename InputIt, typename OutputIt1, typename OutputIt2, typename Predicate> |
constexpr auto | partition_copy (InputIt first, InputIt last, OutputIt1 destinationTrue, OutputIt2 destinationFalse, Predicate p) -> pair< OutputIt1, OutputIt2 > |
| Copies the elements from the range [first, last) to two different ranges depending on the value returned by the predicate p. The elements that satisfy the predicate p are copied to the range beginning at destination_true. The rest of the elements are copied to the range beginning at destination_false.
|
|
template<typename ForwardIt, typename Predicate> |
constexpr auto | partition_point (ForwardIt first, ForwardIt last, Predicate p) -> ForwardIt |
| Examines the partitioned (as if by partition) range [first, last) and locates the end of the first partition, that is, the first element that does not satisfy p or last if all elements satisfy p.
|
|
template<typename ForwardIt, typename T> |
constexpr auto | remove (ForwardIt first, ForwardIt last, T const &value) -> ForwardIt |
| Removes all elements satisfying specific criteria from the range [first, last) and returns a past-the-end iterator for the new end of the range.
|
|
template<typename InputIt, typename OutputIt, typename T> |
constexpr auto | remove_copy (InputIt first, InputIt last, OutputIt destination, T const &value) -> OutputIt |
| Copies elements from the range [first, last), to another range beginning at destination, omitting the elements which satisfy specific criteria. Source and destination ranges cannot overlap. Ignores all elements that are equal to value.
|
|
template<typename InputIt, typename OutputIt, typename Predicate> |
constexpr auto | remove_copy_if (InputIt first, InputIt last, OutputIt destination, Predicate p) -> OutputIt |
| Copies elements from the range [first, last), to another range beginning at destination, omitting the elements which satisfy specific criteria. Source and destination ranges cannot overlap. Ignores all elements for which predicate p returns true.
|
|
template<typename ForwardIt, typename Predicate> |
constexpr auto | remove_if (ForwardIt first, ForwardIt last, Predicate pred) -> ForwardIt |
| Removes all elements satisfying specific criteria from the range [first, last) and returns a past-the-end iterator for the new end of the range.
|
|
template<typename ForwardIt, typename T> |
constexpr auto | replace (ForwardIt first, ForwardIt last, T const &oldValue, T const &newValue) -> void |
| Replaces all elements satisfying specific criteria with new_value in the range [first, last). Replaces all elements that are equal to old_value.
|
|
template<typename ForwardIt, typename Predicate, typename T> |
constexpr auto | replace_if (ForwardIt first, ForwardIt last, Predicate p, T const &newValue) -> void |
| Replaces all elements satisfying specific criteria with new_value in the range [first, last). Replaces all elements for which predicate p returns true.
|
|
template<typename BidirIt> |
constexpr auto | reverse (BidirIt first, BidirIt last) -> void |
| Reverses the order of the elements in the range [first, last) .
|
|
template<typename BidirIt, typename OutputIt> |
constexpr auto | reverse_copy (BidirIt first, BidirIt last, OutputIt destination) -> OutputIt |
| Copies the elements from the range [first, last) to another range beginning at d_first in such a way that the elements in the new range are in reverse order.
|
|
template<typename ForwardIt> |
constexpr auto | rotate (ForwardIt first, ForwardIt nFirst, ForwardIt last) -> ForwardIt |
| Performs a left rotation on a range of elements.
|
|
template<typename ForwardIt, typename OutputIt> |
constexpr auto | rotate_copy (ForwardIt first, ForwardIt nFirst, ForwardIt last, OutputIt destination) -> OutputIt |
| Copies the elements from the range [first, last) , to another range beginning at destination in such a way, that the element nFirst becomes the first element of the new range and nFirst - 1 becomes the last element.
|
|
template<typename ForwardIt> |
constexpr auto | shift_left (ForwardIt first, ForwardIt const last, typename iterator_traits< ForwardIt >::difference_type n) -> ForwardIt |
| Shifts the elements in the range [first, last) by n positions.
|
|
template<typename BidiIt> |
constexpr auto | shift_right (BidiIt first, BidiIt last, typename etl::iterator_traits< BidiIt >::difference_type n) -> BidiIt |
| Shifts the elements in the range [first, last) by n positions.
|
|
template<typename BidirIt, typename Predicate> |
constexpr auto | stable_partition (BidirIt f, BidirIt l, Predicate p) -> BidirIt |
| Reorders the elements in the range [first, last) in such a way that all elements for which the predicate p returns true precede the elements for which predicate p returns false. Relative order of the elements is preserved.
|
|
template<typename ForwardIt1, typename ForwardIt2> |
constexpr auto | swap_ranges (ForwardIt1 first1, ForwardIt1 last1, ForwardIt2 first2) -> ForwardIt2 |
| Exchanges elements between range [first1 ,last1) and another range starting at first2 .
|
|
template<typename ForwardIt, typename Predicate> |
constexpr auto | adjacent_find (ForwardIt first, ForwardIt last, Predicate pred) -> ForwardIt |
| Searches the range [first, last) for two consecutive equal elements. Elements are compared using the given binary predicate p.
|
|
template<typename ForwardIt> |
constexpr auto | adjacent_find (ForwardIt first, ForwardIt last) -> ForwardIt |
| Searches the range [first, last) for two consecutive equal elements. Elements are compared using the given binary predicate p.
|
|
template<typename InputIt, typename Predicate> |
constexpr auto | all_of (InputIt first, InputIt last, Predicate p) -> bool |
| Checks if unary predicate p returns true for all elements in the range [first, last) .
|
|
template<typename InputIt, typename Predicate> |
constexpr auto | any_of (InputIt first, InputIt last, Predicate p) -> bool |
| Checks if unary predicate p returns true for at least one element in the range [first, last) .
|
|
template<typename ForwardIt, typename T, typename Compare> |
constexpr auto | binary_search (ForwardIt first, ForwardIt last, T const &value, Compare comp) -> bool |
| Checks if an element equivalent to value appears within the range [first, last) . For binary_search to succeed, the range [first, last) must be at least partially ordered with respect to value .
|
|
template<typename ForwardIt, typename T> |
constexpr auto | binary_search (ForwardIt first, ForwardIt last, T const &value) -> bool |
| Checks if an element equivalent to value appears within the range [first, last) . For binary_search to succeed, the range [first, last) must be at least partially ordered with respect to value .
|
|
template<typename RandomIt, typename Compare> |
constexpr auto | bubble_sort (RandomIt first, RandomIt last, Compare comp) -> void |
| Sorts the elements in the range [first, last) in non-descending order. The order of equal elements is guaranteed to be preserved.
|
|
template<typename RandomIt> |
constexpr auto | bubble_sort (RandomIt first, RandomIt last) -> void |
| Sorts the elements in the range [first, last) in non-descending order. The order of equal elements is guaranteed to be preserved.
|
|
template<typename Type, typename Compare> |
constexpr auto | clamp (Type const &v, Type const &lo, Type const &hi, Compare comp) -> Type const & |
| If v compares less than lo, returns lo; otherwise if hi compares less than v, returns hi; otherwise returns v. Uses operator< to compare the values.
|
|
template<typename Type> |
constexpr auto | clamp (Type const &v, Type const &lo, Type const &hi) noexcept -> Type const & |
| If v compares less than lo, returns lo; otherwise if hi compares less than v, returns hi; otherwise returns v. Uses operator< to compare the values.
|
|
template<typename BidirIt, typename Compare> |
constexpr auto | merge_sort (BidirIt first, BidirIt last, Compare comp) -> void |
| Sorts the elements in the range [first, last) in non-descending order.
|
|
template<typename BidirIt> |
constexpr auto | merge_sort (BidirIt first, BidirIt last) -> void |
| Sorts the elements in the range [first, last) in non-descending order.
|
|
template<typename FwdIt1, typename FwdIt2, typename Predicate> |
constexpr auto | search (FwdIt1 first, FwdIt1 last, FwdIt2 sFirst, FwdIt2 sLast, Predicate pred) -> FwdIt1 |
| Searches for the first occurrence of the sequence of elements [sFirst, sLast) in the range [first, last) .
|
|
template<typename FwdIt1, typename FwdIt2> |
constexpr auto | search (FwdIt1 first, FwdIt1 last, FwdIt2 sFirst, FwdIt2 sLast) -> FwdIt1 |
| Searches for the first occurrence of the sequence of elements [sFirst, sLast) in the range [first, last) .
|
|
template<typename FwdIt, typename Searcher> |
constexpr auto | search (FwdIt first, FwdIt last, Searcher const &searcher) -> FwdIt |
| Searches for the first occurrence of the sequence of elements [sFirst, sLast) in the range [first, last) .
|
|
template<typename ForwardIt, typename Size, typename ValueT, typename Predicate> |
constexpr auto | search_n (ForwardIt first, ForwardIt last, Size count, ValueT const &value, Predicate pred) -> ForwardIt |
| Searches the range [first, last) for the first sequence of count identical elements, each equal to the given value.
|
|
template<typename ForwardIt, typename Size, typename ValueT> |
constexpr auto | search_n (ForwardIt first, ForwardIt last, Size count, ValueT const &value) -> ForwardIt |
| Searches the range [first, last) for the first sequence of count identical elements, each equal to the given value.
|
|
template<typename InputIt1, typename InputIt2, typename OutputIt, typename Compare> |
constexpr auto | set_difference (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination, Compare comp) -> OutputIt |
| Copies the elements from the sorted range [first1, last1) which are not found in the sorted range [first2, last2) to the range beginning at destination. Elements are compared using the given binary comparison function comp and the ranges must be sorted with respect to the same.
|
|
template<typename InputIt1, typename InputIt2, typename OutputIt> |
constexpr auto | set_difference (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination) -> OutputIt |
| Copies the elements from the sorted range [first1, last1) which are not found in the sorted range [first2, last2) to the range beginning at destination. Elements are compared using the given binary comparison function comp and the ranges must be sorted with respect to the same.
|
|
template<typename InputIt1, typename InputIt2, typename OutputIt, typename Compare> |
constexpr auto | set_intersection (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt dest, Compare comp) -> OutputIt |
| Constructs a sorted range beginning at dest consisting of elements that are found in both sorted ranges [first1, last1) and [first2, last2) . If some element is found m times in [first1, last1) and n times in [first2, last2) , the first min(m, n) elements will be copied from the first range to the destination range. The order of equivalent elements is preserved. The resulting range cannot overlap with either of the input ranges.
|
|
template<typename InputIt1, typename InputIt2, typename OutputIt> |
constexpr auto | set_intersection (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt dest) -> OutputIt |
| Constructs a sorted range beginning at dest consisting of elements that are found in both sorted ranges [first1, last1) and [first2, last2) . If some element is found m times in [first1, last1) and n times in [first2, last2) , the first min(m, n) elements will be copied from the first range to the destination range. The order of equivalent elements is preserved. The resulting range cannot overlap with either of the input ranges.
|
|
template<typename InputIt1, typename InputIt2, typename OutputIt, typename Compare> |
constexpr auto | set_symmetric_difference (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination, Compare comp) -> OutputIt |
| Computes symmetric difference of two sorted ranges: the elements that are found in either of the ranges, but not in both of them are copied to the range beginning at destination. The resulting range is also sorted.
|
|
template<typename InputIt1, typename InputIt2, typename OutputIt> |
constexpr auto | set_symmetric_difference (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt dest) -> OutputIt |
| Computes symmetric difference of two sorted ranges: the elements that are found in either of the ranges, but not in both of them are copied to the range beginning at destination. The resulting range is also sorted.
|
|
template<typename InputIt1, typename InputIt2, typename OutputIt, typename Compare> |
constexpr auto | set_union (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination, Compare comp) -> OutputIt |
| Constructs a sorted union beginning at destination consisting of the set of elements present in one or both sorted ranges [first1, last1) and [first2, last2) . The resulting range cannot overlap with either of the input ranges.
|
|
template<typename InputIt1, typename InputIt2, typename OutputIt> |
constexpr auto | set_union (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination) -> OutputIt |
| Constructs a sorted union beginning at destination consisting of the set of elements present in one or both sorted ranges [first1, last1) and [first2, last2) . The resulting range cannot overlap with either of the input ranges.
|
|
template<typename RandomIt, typename Compare> |
constexpr auto | sort (RandomIt first, RandomIt last, Compare comp) -> void |
| Sorts the elements in the range [first, last) in non-descending order. The order of equal elements is not guaranteed to be preserved.
|
|
template<typename RandomIt> |
constexpr auto | sort (RandomIt first, RandomIt last) -> void |
| Sorts the elements in the range [first, last) in non-descending order. The order of equal elements is not guaranteed to be preserved.
|
|
template<typename RandomIt, typename Compare> |
constexpr auto | stable_sort (RandomIt first, RandomIt last, Compare comp) -> void |
| Sorts the elements in the range [first, last) in non-descending order. The order of equivalent elements is guaranteed to be preserved. Elements are compared using the given comparison function comp.
|
|
template<typename RandomIt> |
constexpr auto | stable_sort (RandomIt first, RandomIt last) -> void |
| Sorts the elements in the range [first, last) in non-descending order. The order of equivalent elements is guaranteed to be preserved. Elements are compared using the given comparison function comp.
|
|
template<typename InputIt, typename OutputIt, typename UnaryOp> |
constexpr auto | transform (InputIt first, InputIt last, OutputIt dest, UnaryOp op) -> OutputIt |
| Applies the given function to a range and stores the result in another range, beginning at dest. The unary operation op is applied to the range defined by [first, last) .
|
|
template<typename InputIt1, typename InputIt2, typename OutputIt, typename BinaryOp> |
constexpr auto | transform (InputIt1 first1, InputIt1 last1, InputIt2 first2, OutputIt dest, BinaryOp op) -> OutputIt |
| Applies the given function to a range and stores the result in another range, beginning at dest. The unary operation op is applied to the range defined by [first, last) .
|
|
template<typename ForwardIt, typename Predicate> |
constexpr auto | unique (ForwardIt first, ForwardIt last, Predicate pred) -> ForwardIt |
| Eliminates all except the first element from every consecutive group of equivalent elements from the range [first, last) and returns a past-the-end iterator for the new logical end of the range.
|
|
template<typename ForwardIt> |
constexpr auto | unique (ForwardIt first, ForwardIt last) -> ForwardIt |
| Eliminates all except the first element from every consecutive group of equivalent elements from the range [first, last) and returns a past-the-end iterator for the new logical end of the range.
|
|
template<typename InputIt, typename OutputIt, typename Predicate> |
constexpr auto | unique_copy (InputIt first, InputIt last, OutputIt destination, Predicate pred) -> OutputIt |
| Copies the elements from the range [first, last) , to another range beginning at d_first in such a way that there are no consecutive equal elements. Only the first element of each group of equal elements is copied.
|
|
template<typename InputIt, typename OutputIt> |
constexpr auto | unique_copy (InputIt first, InputIt last, OutputIt destination) -> OutputIt |
| Copies the elements from the range [first, last) , to another range beginning at d_first in such a way that there are no consecutive equal elements. Only the first element of each group of equal elements is copied.
|
|
template<typename ForwardIt, typename T, typename Compare> |
constexpr auto | upper_bound (ForwardIt first, ForwardIt last, T const &value, Compare comp) -> ForwardIt |
| Returns an iterator pointing to the first element in the range [first, last) that is greater than value , or last if no such element is found.
|
|
template<typename ForwardIt, typename T> |
constexpr auto | upper_bound (ForwardIt first, ForwardIt last, T const &value) -> ForwardIt |
| Returns an iterator pointing to the first element in the range [first, last) that is greater than value , or last if no such element is found.
|
|
Algorithms that operate on ranges.