3#ifndef TETL_ALGORITHM_FIND_END_HPP
4#define TETL_ALGORITHM_FIND_END_HPP
23template <
typename ForwardIt1,
typename ForwardIt2,
typename Predicate>
24[[nodiscard]]
constexpr auto
25find_end(ForwardIt1 first, ForwardIt1 last, ForwardIt2 sFirst, ForwardIt2 sLast, Predicate p) -> ForwardIt1
27 if (sFirst == sLast) {
32 auto newResult =
etl::search(first, last, sFirst, sLast, p);
33 if (newResult == last) {
44template <
typename ForwardIt1,
typename ForwardIt2>
45[[nodiscard]]
constexpr auto find_end(ForwardIt1 first, ForwardIt1 last, ForwardIt2 sFirst, ForwardIt2 sLast)
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,...
Definition find_end.hpp:25
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,...
Definition search.hpp:24
Definition adjacent_find.hpp:8
Function object for performing comparisons. Unless specialised, invokes operator== on type T....
Definition equal_to.hpp:14