Namespaces
Variants
Views
Actions

Talk:cpp/container/unordered map/erase

From cppreference.com

In the complexity section there are multiple references to "a.size()" without an explanation about "a". I suppose it is the unordered_map, but I think a more verbose name (like "unordered_map.size()" would be better here. 82.119.3.0 09:46, 7 May 2013 (PDT)

Thanks for pointing that out. P12 10:32, 7 May 2013 (PDT)

[edit] Note about end() iterator can't be used is confusing

'pos' and 'first' parameters must be valid and dereferenceable, but 'last' must be only valid, so it's possible to call m.erase(m.begin(), m.end());.

Good catch; I've updated the note to only talk about the pos iterator. --Nate 16:32, 28 July 2013 (PDT)