This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/41480] std::map.erase on cygwin
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Sep 2009 09:17:37 -0000
- Subject: [Bug c++/41480] std::map.erase on cygwin
- References: <bug-41480-18230@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from paolo dot carlini at oracle dot com 2009-09-28 09:17 -------
In any case, the code is invalid, try building (and then running) with
-D_GLIBCXX_DEBUG to see the problem. This way, for example, is fine:
for (; it != mymap.end() ; /* it++ */) {
mymap.erase((*it++).first);
}
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41480