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>
auto ranges::unstable_remove_if (I first, I last, C pred, P proj={}) -> I requires bidirectional_iterator< I > &&permutable< I > &&indirect_unary_predicate< C, projected< I, P >>
 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>
auto ranges::unstable_remove_if (Rng &&rng, C pred, P proj=P{}) -> safe_iterator_t< Rng > requires bidirectional_range< Rng > &&common_range< Rng > &&permutable< iterator_t< Rng >> &&indirect_unary_predicate< C, projected< iterator_t< Rng >, P >>