Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
None
-
5.14.1
-
None
Description
// code placeholder int main (int argc, char* argv[]) { QCoreApplication aaa(argc, argv); std::set<QPair<int, int>> sAll = { { 48, 33 }, { 48, 35 }, { 48, 34 }}; QSet<QPair<int, int>> sQt(sAll.cbegin(), sAll.cend()); auto sDummy = sQt; // without this all ok for (auto it = sQt.cbegin(), itEnd = sQt.cend(); it != itEnd; ) if (sAll.find(*it) != sAll.end()) it = sQt.erase(it); else ++it; return aaa.exec(); }
Without sDummy all works fine. But when sQt is shared something happens and this code will crush trying to increment past the end iterator