4#ifndef TETL_ALGORITHM_FIND_FIRST_OF_HPP
5#define TETL_ALGORITHM_FIND_FIRST_OF_HPP
7#include <etl/_functional/equal_to.hpp>
25template <
typename InputIt,
typename ForwardIt,
typename Predicate>
26[[nodiscard]]
constexpr auto
27find_first_of(InputIt first, InputIt last, ForwardIt sFirst, ForwardIt sLast, Predicate pred) -> InputIt
29 for (; first != last; ++first) {
30 for (
auto it = sFirst; it != sLast; ++it) {
31 if (pred(*first, *it)) {
51template <
typename InputIt,
typename ForwardIt>
52[[nodiscard]]
constexpr auto find_first_of(InputIt first, InputIt last, ForwardIt sFirst, ForwardIt sLast) -> InputIt
54 return etl::find_first_of(first, last, sFirst, sLast,
etl::
equal_to());
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).
Definition find_first_of.hpp:52
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)....
Definition find_first_of.hpp:27
Definition adjacent_find.hpp:9
Function object for performing comparisons. Unless specialised, invokes operator== on type T....
Definition equal_to.hpp:15