Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.6.3
-
None
-
Qt 4.6.3 (official binaries)
VS 2008 SP1
Vista SP2
Description
When converting some code from std::list to QList I got some unexpected crashes. I found that the problem is that QList handles iterators validity in a non-conforming way (as per the C++ standard)
I am attaching a file where you can see the different behaviour. In short: QList::clear() invalidates a stored QList::end() iterator, while the C++ standard says that the end() iterator should remain valid.
See also my post on comp.lang.c++:
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/337e3a68868940f9#
I am reporting this as a bug because I understand that the whole point of having iterators in QList is for C++ compatibility.