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

Public Member Functions

template<typename I , typename S , typename C = equal_to, typename P = ident, requires = (ForwardIterator<I>() && Sentinel<S, I>() && IndirectRelation<C, projected<I, P>>())>
operator() (I begin, S end, C pred=C{}, P proj=P{}) const
 function template adjacent_find_fn::operator() More...
 
template<typename Rng , typename C = equal_to, typename P = ident, typename I = iterator_t<Rng>, requires = (ForwardRange<Rng>() && IndirectRelation<C, projected<I, P>>())>
safe_iterator_t< Rng > operator() (Rng &&rng, C pred=C{}, P proj=P{}) const
 

Member Function Documentation

◆ operator()() [1/2]

template<typename I , typename S , typename C = equal_to, typename P = ident, requires = (ForwardIterator<I>() && Sentinel<S, I>() && IndirectRelation<C, projected<I, P>>())>
I ranges::v3::adjacent_find_fn::operator() ( begin,
end,
pred = C{},
proj = P{} 
) const

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

References ranges::v3::begin, ranges::v3::end, and ranges::v3::next.

◆ operator()() [2/2]

template<typename Rng , typename C = equal_to, typename P = ident, typename I = iterator_t<Rng>, requires = (ForwardRange<Rng>() && IndirectRelation<C, projected<I, P>>())>
safe_iterator_t<Rng> ranges::v3::adjacent_find_fn::operator() ( Rng &&  rng,
pred = C{},
proj = P{} 
) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References ranges::v3::begin, ranges::v3::end, and ranges::v3::move.