4#ifndef TETL_ALGORITHM_FIND_END_HPP
5#define TETL_ALGORITHM_FIND_END_HPP
7#include <etl/_algorithm/search.hpp>
8#include <etl/_functional/equal_to.hpp>
24template <
typename ForwardIt1,
typename ForwardIt2,
typename Predicate>
25[[nodiscard]]
constexpr auto
26find_end(ForwardIt1 first, ForwardIt1 last, ForwardIt2 sFirst, ForwardIt2 sLast, Predicate p) -> ForwardIt1
28 if (sFirst == sLast) {
33 auto newResult =
etl::search(first, last, sFirst, sLast, p);
34 if (newResult == last) {
45template <
typename ForwardIt1,
typename ForwardIt2>
46[[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) -> ForwardIt1
Definition find_end.hpp:46
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:26
Definition adjacent_find.hpp:9
Function object for performing comparisons. Unless specialised, invokes operator== on type T....
Definition equal_to.hpp:15