Priority: Not Evaluated
Affects Version/s: 4.6.3
Fix Version/s: None
Component/s: Core: Containers and Algorithms
Environment:Qt 4.6.3 (official binaries)
VS 2008 SP1
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++:
I am reporting this as a bug because I understand that the whole point of having iterators in QList is for C++ compatibility.