From Jason Turner

[flat.multiset.erasure]

Diff to HTML by rtfpessoa

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