[Bug libstdc++/58153] unordered_multimap::erase(iterator) is not constant-time when many entries have the same key

2015-04-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58153 Jonathan Wakely redi at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug libstdc++/58153] unordered_multimap::erase(iterator) is not constant-time when many entries have the same key

2013-08-26 Thread fdumont at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58153 --- Comment #5 from François Dumont fdumont at gcc dot gnu.org --- And your remark is good too and will avoid me to spend some time on this idea. Standard requirements regarding validity of iterators won't let us have iterators invalidated because

[Bug libstdc++/58153] unordered_multimap::erase(iterator) is not constant-time when many entries have the same key

2013-08-26 Thread temporal at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58153 --- Comment #6 from Kenton Varda temporal at gmail dot com --- Yep, I realize that erase_after would need to be added to the standard. I was just speculating that it may be something the standard committee should consider. I've long since solved

[Bug libstdc++/58153] unordered_multimap::erase(iterator) is not constant-time when many entries have the same key

2013-08-24 Thread fdumont at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58153 --- Comment #3 from François Dumont fdumont at gcc dot gnu.org --- This report entry made me wonder why iterators could not just be pointing to the node just before the one containing the pointed to value. For instance begin() iterator would

[Bug libstdc++/58153] unordered_multimap::erase(iterator) is not constant-time when many entries have the same key

2013-08-24 Thread temporal at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58153 --- Comment #4 from Kenton Varda temporal at gmail dot com --- This report entry made me wonder why iterators could not just be pointing to the node just before the one containing the pointed to value. That's a neat idea. I think there is an

[Bug libstdc++/58153] unordered_multimap::erase(iterator) is not constant-time when many entries have the same key

2013-08-14 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58153 --- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org --- (In reply to Kenton Varda from comment #0) I do not know exactly what the standard requires here, but all of the references I can find claim that erase(iter) should be average-time

[Bug libstdc++/58153] unordered_multimap::erase(iterator) is not constant-time when many entries have the same key

2013-08-14 Thread temporal at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58153 --- Comment #2 from Kenton Varda temporal at gmail dot com --- The standard says average case O(1), worst case O(a.size()), so if every element in the container has the same key then it's O(n). I'm not sure that follows. Yes, the standard says