tmp/tmpbratni94/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Erasure <a id="flat.multimap.erasure">[[flat.multimap.erasure]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<class Key, class T, class Compare, class KeyContainer, class MappedContainer,
|
| 5 |
+
class Predicate>
|
| 6 |
+
typename flat_multimap<Key, T, Compare, KeyContainer, MappedContainer>::size_type
|
| 7 |
+
erase_if(flat_multimap<Key, T, Compare, KeyContainer, MappedContainer>& c, Predicate pred);
|
| 8 |
+
```
|
| 9 |
+
|
| 10 |
+
*Preconditions:* `Key` and `T` meet the *Cpp17MoveAssignable*
|
| 11 |
+
requirements.
|
| 12 |
+
|
| 13 |
+
*Effects:* Let E be `bool(pred(pair<const Key&, const T&>(e)))`. Erases
|
| 14 |
+
all elements `e` in `c` for which E holds.
|
| 15 |
+
|
| 16 |
+
*Returns:* The number of elements erased.
|
| 17 |
+
|
| 18 |
+
*Complexity:* Exactly `c.size()` applications of the predicate.
|
| 19 |
+
|
| 20 |
+
*Remarks:* Stable [[algorithm.stable]]. If an invocation of `erase_if`
|
| 21 |
+
exits via an exception, `c` is in a valid but unspecified
|
| 22 |
+
state [[defns.valid]].
|
| 23 |
+
|
| 24 |
+
[*Note 1*: `c` still meets its invariants, but can be
|
| 25 |
+
empty. — *end note*]
|
| 26 |
+
|