https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67922
--- Comment #3 from Yegor Derevenets ---
A small correction. A colleague of mine bothered to read the source code of
libc++ and noticed that its implementation of clear() method also generally
takes time, linear in the number of buckets. This
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67922
--- Comment #2 from Yegor Derevenets ---
> But then the issue is that clear () doesn't shrink the map.
No, the issue is that clear() touches all the buckets, instead of touching only
those containing the elements. libc++'s implementation does
: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: yegor.derevenets at gmail dot com
Target Milestone: ---
std::unordered_map::clear internally clears the whole array of buckets using
memset. Consequently, the clearing
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123
Bug #: 55123
Summary: [C++11] Construction of shared_ptrconst T from
unique_ptrconst T fails
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123
--- Comment #1 from Yegor Derevenets yegor.derevenets at gmail dot com
2012-10-29 17:09:49 UTC ---
Created attachment 28561
-- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28561
Preprocessed test.cpp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123
--- Comment #4 from Yegor Derevenets yegor.derevenets at gmail dot com
2012-10-29 18:35:45 UTC ---
Confirm, the patch works for me.