Affected subclauses: [associative.reqmts] and
[unord.req]
Change: Heterogeneous
extract and
erase overloads
for associative containers
. Rationale: Improve efficiency of erasing elements from associative containers
. Effect on original feature: Valid C++ 2020 code may fail to compile in this revision of C++
. [
Example 1:
struct B {
auto operator<=>(const B&) const = default;
};
struct D : private B {
void f(std::set<B, std::less<>>& s) {
s.erase(*this);
}
};
—
end example]