4#ifndef TETL_ALGORITHM_SEARCH_HPP
5#define TETL_ALGORITHM_SEARCH_HPP
7#include <etl/_functional/equal_to.hpp>
24template <
typename FwdIt1,
typename FwdIt2,
typename Predicate>
25[[nodiscard]]
constexpr auto search(FwdIt1 first, FwdIt1 last, FwdIt2 sFirst, FwdIt2 sLast, Predicate pred) -> FwdIt1
29 for (
auto sIt = sFirst;; ++it, (
void)++sIt) {
36 if (
not pred(*it, *sIt)) {
43template <
typename FwdIt1,
typename FwdIt2>
44[[nodiscard]]
constexpr auto search(FwdIt1 first, FwdIt1 last, FwdIt2 sFirst, FwdIt2 sLast) -> FwdIt1
49template <
typename FwdIt,
typename Searcher>
50[[nodiscard]]
constexpr auto search(FwdIt first, FwdIt last, Searcher
const& searcher) -> FwdIt
52 return searcher(first, last).first;
constexpr auto search(FwdIt first, FwdIt last, Searcher const &searcher) -> FwdIt
Definition search.hpp:50
constexpr auto search(FwdIt1 first, FwdIt1 last, FwdIt2 sFirst, FwdIt2 sLast) -> FwdIt1
Definition search.hpp:44
constexpr auto search(FwdIt1 first, FwdIt1 last, FwdIt2 sFirst, FwdIt2 sLast, Predicate pred) -> FwdIt1
Definition search.hpp:25
Definition adjacent_find.hpp:9
Function object for performing comparisons. Unless specialised, invokes operator== on type T....
Definition equal_to.hpp:15