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

Public Member Functions

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

Member Function Documentation

◆ operator()()

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

template function unique_fn::operator()

range-based version of the unique std algorithm

Precondition
Rng is a model of the ForwardView concept
I is a model of the ForwardIterator concept
S is a model of the Sentinel concept
C is a model of the Relation concept

References ranges::v3::adjacent_find, ranges::v3::end, ranges::v3::move, ranges::v3::next, and ranges::v3::ref.