2.0 KiB
[flat.multimap.erasure]
23 Containers library [containers]
23.6 Container adaptors [container.adaptors]
23.6.9 Class template flat_multimap [flat.multimap]
23.6.9.5 Erasure [flat.multimap.erasure]
template<class Key, class T, class Compare, class KeyContainer, class MappedContainer, class Predicate> constexpr typename flat_multimap<Key, T, Compare, KeyContainer, MappedContainer>::size_type erase_if(flat_multimap<Key, T, Compare, KeyContainer, MappedContainer>& c, Predicate pred);
Preconditions: Key and T meet the Cpp17MoveAssignable requirements.
Effects: Let E be bool(pred(pair<const Key&, const T&>(e))).
Erases all elements e in c for which E holds.
Returns: The number of elements erased.
Complexity: Exactly c.size() applications of the predicate.
Remarks: Stable ([algorithm.stable]).
If an invocation of erase_if exits via an exception,c is in a valid but unspecified state ([defns.valid]).
[Note 1:
c still meets its invariants, but can be empty.
â end note]