What section of the C++11 standard (here\'s a copy of a draft standard) requires associative containers like std::set, std::map, std::unordered_set, and std::unordered_map to im
There are general requirements in the table for associative containers which describe the requirements for erase
calls.
E.g. a.erase(q)
| erases the element pointed to by q
.
The element type for map
is a pair of a key and a value. There is no sensible interpretation of "erases" that doesn't involve the proper destruction of the element (key and value). I doubt there is anything more explicitly worded for this situation in the standard.