Files
2025-10-25 03:02:53 +03:00

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);

1

#

Preconditions: Key and T meet the Cpp17MoveAssignable requirements.

2

#

Effects: Let E be bool(pred(pair<const Key&, const T&>(e))).

Erases all elements e in c for which E holds.

3

#

Returns: The number of elements erased.

4

#

Complexity: Exactly c.size() applications of the predicate.

5

#

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]