[multiset.erasure]

# 23 Containers library [[containers]](./#containers)

## 23.4 Associative containers [[associative]](associative#multiset.erasure)

### 23.4.7 Class template multiset [[multiset]](multiset#erasure)

#### 23.4.7.3 Erasure [multiset.erasure]

[ð](#lib:erase_if,multiset)

`template<class Key, class Compare, class Allocator, class Predicate>
  constexpr typename multiset<Key, Compare, Allocator>::size_type
    erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L13294)

*Effects*: Equivalent to:auto original_size = c.size();for (auto i = c.begin(), last = c.end(); i != last; ) {if (pred(*i)) { i = c.erase(i); } else {++i; }}return original_size - c.size();
