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

Public Member Functions

template<typename I , typename S , typename F , typename P = ident, requires = (InputIterator<I>() && Sentinel<S, I>() && IndirectPredicate<F, projected<I, P> >())>
operator() (I begin, S end, F pred, P proj=P{}) const
 template function find_fn::operator() More...
 
template<typename Rng , typename F , typename P = ident, typename I = iterator_t<Rng>, requires = (InputRange<Rng>() && IndirectPredicate<F, projected<I, P>>())>
safe_iterator_t< Rng > operator() (Rng &&rng, F pred, P proj=P{}) const
 

Member Function Documentation

◆ operator()() [1/2]

template<typename I , typename S , typename F , typename P = ident, requires = (InputIterator<I>() && Sentinel<S, I>() && IndirectPredicate<F, projected<I, P> >())>
I ranges::v3::find_if_fn::operator() ( begin,
end,
pred,
proj = P{} 
) const

template function find_fn::operator()

range-based version of the find std algorithm

Precondition
Rng is a model of the Range concept
I is a model of the InputIterator concept
S is a model of the Sentinel<I> concept
P is a model of the Invocable<V> concept, where V is the value type of I.
F models Predicate<X>, where X is the result type of Invocable<P, V>

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

◆ operator()() [2/2]

template<typename Rng , typename F , typename P = ident, typename I = iterator_t<Rng>, requires = (InputRange<Rng>() && IndirectPredicate<F, projected<I, P>>())>
safe_iterator_t<Rng> ranges::v3::find_if_fn::operator() ( Rng &&  rng,
pred,
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.