function object
std::ranges::adjacent_find
- Header
<algorithm>- Draft
- [alg.adjacent.find]
- Scope
std::ranges- cppreference
- std::ranges::adjacent_find
Synopsis
inline constexpr /* implementation-defined */ adjacent_find = {};Call signatures
adjacent_find is a function object; these are its call operators as libycxx declares them, written as the functions the draft declares.
- (1)
template< std::ranges::forward_range R, class Proj = std::identity, std::indirect_binary_predicate<std::projected<iterator_t<R>, Proj>, std::projected<iterator_t<R>, Proj>> Pred = std::ranges::equal_to> [[nodiscard]] constexpr borrowed_iterator_t<R> adjacent_find( R&& r, Pred pred = {}, Proj proj = {}); - (2)
template< std::forward_iterator I, std::sentinel_for<I> S, class Proj = std::identity, std::indirect_binary_predicate<std::projected<I, Proj>, std::projected<I, Proj>> Pred = std::ranges::equal_to> [[nodiscard]] constexpr I adjacent_find( I first, S last, Pred pred = {}, Proj proj = {}); - (3)
template< class ExecutionPolicy, std::random_access_iterator I, std::sized_sentinel_for<I> S, class Proj = std::identity, std::indirect_binary_predicate<std::projected<I, Proj>, std::projected<I, Proj>> Pred = std::ranges::equal_to> requires execution-policy<ExecutionPolicy> decltype(auto) adjacent_find( ExecutionPolicy&&, I first, S last, Pred pred = {}, Proj proj = {}) noexcept; - (4)
template< class ExecutionPolicy, sized-random-access-range R, class Proj = std::identity, std::indirect_binary_predicate<std::projected<std::ranges::iterator_t<R>, Proj>, std::projected<std::ranges::iterator_t<R>, Proj>> Pred = std::ranges::equal_to> requires execution-policy<ExecutionPolicy> decltype(auto) adjacent_find( ExecutionPolicy&&, R&& r, Pred pred = {}, Proj proj = {}) noexcept;