22 Containers library [containers]

22.5 Unordered associative containers [unord]

22.5.6 Class template unordered_­set [unord.set]

22.5.6.3 Erasure [unord.set.erasure]

template<class K, class H, class P, class A, class Predicate> void erase_if(unordered_set<K, H, P, A>& c, Predicate pred);
Effects: Equivalent to:
for (auto i = c.begin(), last = c.end(); i != last; ) {
  if (pred(*i)) {
    i = c.erase(i);
  } else {
    ++i;
  }
}