template<class Key, class Compare, class Allocator, class Predicate> void erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred);
for (auto i = c.begin(), last = c.end(); i != last; ) { if (pred(*i)) { i = c.erase(i); } else { ++i; } }