Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
4.8.2, 5.1.0
-
None
-
499957eb8b1c5150823f05f40f32b04ba13b1640
Description
Consider the attached test program.
A naive user would likely expect the output to be:
3 2
1 2
5
1 2
...as indeed it is when using std::map.
However, with QMap, the output is:
3 2
3 2
3
5 2
I realize this is probably difficult to fix (and the performance cost of doing so might be exorbitant), but it seems like an interesting enough caveat to at least warrant a larger warning in the documentation than the passing remark buried in the container overview page. (Also, the existing warning does not appear to cover that making a copy "invalidates" iterators).