From Jason Turner

[flat.map.erasure]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp23v4swbj/{from.md → to.md} +26 -0
tmp/tmp23v4swbj/{from.md → to.md} RENAMED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Erasure <a id="flat.map.erasure">[[flat.map.erasure]]</a>
2
+
3
+ ``` cpp
4
+ template<class Key, class T, class Compare, class KeyContainer, class MappedContainer,
5
+ class Predicate>
6
+ typename flat_map<Key, T, Compare, KeyContainer, MappedContainer>::size_type
7
+ erase_if(flat_map<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
+