This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/19433] New: set, multiset, map, multimap misuse hint on insert
- From: "chris at bubblescope dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2005 23:30:41 -0000
- Subject: [Bug libstdc++/19433] New: set, multiset, map, multimap misuse hint on insert
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Unless I'm misreading the source (possible) in bits/stl_tree.h in
insert_unique(iterator, const value_type&) and insert_equal(iterator, const
value_type&), it looks like we use the passed hint by trying to insert BEFORE
it, rather than after it. I'd imagine this bug is present in all versions of
libstdc++-v3.
This doesn't cause incorrect behaviour, just log(n) inserts rather than constant
time ones. In theory this shouldn't be too hard to fix, but playing with the
tree code may require being careful. I'm submitting a bug report just so it
doesn't get forgotten about :)
--
Summary: set, multiset, map, multimap misuse hint on insert
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: chris at bubblescope dot net
CC: caj at cs dot york dot ac dot uk,gcc-bugs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19433