http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49717
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-07-12 13:48:32 UTC --- http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt03ch17s02.html "All functional and exception-handling guarantees made by the normal library also hold for the debug mode library, with one exception: performance guarantees made by the normal library may not hold in the debug mode library. For instance, erasing an element in a std::list is a constant-time operation in normal library, but in debug mode it is linear in the number of iterators that reference that particular list. So while your (correct) program won't change its results, it is likely to execute more slowly."