Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::unique_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 sortable< I, C, P > &&sentinel_for< S, I >
 template function unique_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 sortable< iterator_t< Rng >, C, P > &&range< Rng >
 

Member Function Documentation

◆ operator()()

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

template function unique_fn::operator()

range-based version of the unique std algorithm

Precondition
Rng is a model of the forward_range concept
I is a model of the forward_iterator concept
S is a model of the sentinel_for concept
C is a model of the relation concept