[Bug libstdc++/41975] unordered_set::erase performs worse when nearly empty
sstrasser at systemhaus-gruppe dot de
gcc-bugzilla@gcc.gnu.org
Sun Nov 29 02:29:00 GMT 2009
------- Comment #9 from sstrasser at systemhaus-gruppe dot de 2009-11-29 02:29 -------
(In reply to comment #7)
> An implementation is probably expected to shrink bucket_count when size
> shrinks, so the complexity should still be O(size). That would be good
> for memory use anyway, so why's that not done?
>
shrinking invalidates iterators, doesn't it?
erase() is specified not to invalidate iterators.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41975
More information about the Gcc-bugs
mailing list