21 Containers library [containers]

21.5 Unordered associative containers [unord]

21.5.4 Class template unordered_­map [unord.map]

21.5.4.5 Erasure [unord.map.erasure]

template <class K, class T, class H, class P, class A, class Predicate> void erase_if(unordered_map<K, T, 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;
  }
}