Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::adjacent_find_fn Struct Reference

Public Member Functions

template<typename I , typename S , typename C = equal_to, typename P = identity>
auto operator() (I begin, S end, C pred=C{}, P proj=P{}) const -> I requires forward_iterator< I > &&sentinel_for< S, I > &&indirect_relation< C, projected< I, P >>
 function template adjacent_find_fn::operator() More...
 
template<typename Rng , typename C = equal_to, typename P = identity>
auto operator() (Rng &&rng, C pred=C{}, P proj=P{}) const -> safe_iterator_t< Rng > requires forward_range< Rng > &&indirect_relation< C, projected< iterator_t< Rng >, P >>
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Member Function Documentation

◆ operator()()

template<typename I , typename S , typename C = equal_to, typename P = identity>
auto ranges::adjacent_find_fn::operator() ( begin,
end,
pred = C{},
proj = P{} 
) const -> I requires forward_iterator<I> && sentinel_for<S, I> && indirect_relation<C, projected<I, P>>

function template adjacent_find_fn::operator()

range-based version of the adjacent_find std algorithm

Precondition
Rng is a model of the Range concept
C is a model of the BinaryPredicate concept