[PATCH] : PR libstdc++ 3349
Sylvain Pion
Sylvain.Pion@sophia.inria.fr
Thu Aug 16 15:49:00 GMT 2001
Hi,
This trivial patch fixes PR 3349, a 2.95 regression, concerning a bug in
std::map.insert(hint, value). It just reverts the code to what was in old
versions, presumably before changes made by John Potter in 1999. I couldn't
access the mail archives of libstdc++ from that time (broken links), and I
couldn't find where this file was before, so couldn't "cvs annotate" to tell
why exactly this change was made. Someone who knows should probably double
check. Here's a test-case for the test-suite :
void test()
{
typedef std::map<int, int> Map;
Map M;
Map::iterator hint;
hint = M.insert(Map::value_type(7, 0)).first;
M.insert(hint, Map::value_type(8, 1));
if (M.find(7) == M.end())
abort();
}
--
Sylvain
ChangeLog
2001-08-17 Sylvain Pion <Sylvain.Pion@sophia.inria.fr>
PR libstdc++/3349
* include/bits/stl_tree.h (insert_unique): undo last change.
More information about the Libstdc++
mailing list