3#ifndef TETL_ALGORITHM_ADJACENT_FIND_HPP
4#define TETL_ALGORITHM_ADJACENT_FIND_HPP
21template <
typename ForwardIt,
typename Predicate>
22[[nodiscard]]
constexpr auto adjacent_find(ForwardIt first, ForwardIt last, Predicate pred) -> ForwardIt
31 for (;
next != last; ++
next, (void)++first) {
32 if (pred(*first, *
next)) {
40template <
typename ForwardIt>
41[[nodiscard]]
constexpr auto adjacent_find(ForwardIt first, ForwardIt last) -> ForwardIt
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:22
constexpr auto next(InputIt it, typename iterator_traits< InputIt >::difference_type n=1) -> InputIt
Return the nth successor of iterator it.
Definition next.hpp:14
Definition adjacent_find.hpp:8
Function object for performing comparisons. Unless specialised, invokes operator== on type T....
Definition equal_to.hpp:14