tmp/tmpzp6t9p46/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### [[containers]]: containers library <a id="diff.cpp20.containers">[[diff.cpp20.containers]]</a>
|
| 2 |
+
|
| 3 |
+
**Change:** Heterogeneous `extract` and `erase` overloads for
|
| 4 |
+
associative containers. **Rationale:** Improve efficiency of erasing
|
| 5 |
+
elements from associative containers. **Effect on original feature:**
|
| 6 |
+
Valid C++20 code may fail to compile in this revision of C++. For
|
| 7 |
+
example:
|
| 8 |
+
|
| 9 |
+
``` cpp
|
| 10 |
+
struct B {
|
| 11 |
+
auto operator<=>(const B&) const = default;
|
| 12 |
+
};
|
| 13 |
+
|
| 14 |
+
struct D : private B {
|
| 15 |
+
void f(std::set<B, std::less<>>& s) {
|
| 16 |
+
s.erase(*this); // ill formed; previously well-formed
|
| 17 |
+
}
|
| 18 |
+
};
|
| 19 |
+
```
|
| 20 |
+
|