Range-v3
Range algorithms, views, and actions for the Standard Library
unstable_remove_if.hpp File Reference

Functions

template<typename I , typename C , typename P = identity>
requires bidirectional_iterator<I> && permutable<I> && indirect_unary_predicate<C, projected<I, P>>
constexpr I ranges::unstable_remove_if (I first, I last, C pred, P proj={})
 unstable_remove have O(1) complexity for each element remove, unlike remove O(n) [for worst case]. Each erased element overwritten (moved in) with last one. unstable_remove_if does not preserve relative element order. More...
 
template<typename Rng , typename C , typename P = identity>
requires bidirectional_range<Rng> && common_range<Rng> && permutable<iterator_t<Rng>> && indirect_unary_predicate<C, projected<iterator_t<Rng>, P>>
constexpr borrowed_iterator_t< Rng > ranges::unstable_remove_if (Rng &&rng, C pred, P proj=P{})
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.