llvm::erase_if

Erase elements of C for which P is true.

Synopsis

Declared in <llvm/ADT/STLExtras.h>

template<
    typename Container,
    typename UnaryPredicate>
void
erase_if(
    Container& C,
    UnaryPredicate P);

Description

Equivalent to C.erase(remove_if(C, pred), C.end()). Works for any container whose erase method accepts two iterators.

Parameters

NameDescription
CContainer to modify.
PUnary predicate selecting elements to erase.