4#ifndef TETL_ALGORITHM_ADJACENT_FIND_HPP
5#define TETL_ALGORITHM_ADJACENT_FIND_HPP
7#include <etl/_functional/equal_to.hpp>
22template <
typename ForwardIt,
typename Predicate>
23[[nodiscard]]
constexpr auto adjacent_find(ForwardIt first, ForwardIt last, Predicate pred) -> ForwardIt
32 for (; next != last; ++next, (
void)++first) {
33 if (pred(*first, *next)) {
41template <
typename ForwardIt>
42[[nodiscard]]
constexpr auto adjacent_find(ForwardIt first, ForwardIt last) -> 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 ...
Definition adjacent_find.hpp:42
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 ...
Definition adjacent_find.hpp:23
Definition adjacent_find.hpp:9
Function object for performing comparisons. Unless specialised, invokes operator== on type T....
Definition equal_to.hpp:15