QMap iteration crash
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using Qt 5.5 on Windows 8.1. When I run the code below, the application is able to get through one iteration, but crashes on the second one. 100% reproducible. (Copy/paste it into a Qt Creator instance and test; it might work for you). #include <QCoreApplication> #include <QDebug> #include <utility> using std::pair; int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QMap<QString, pair<QString, QString> > table_def = { {"alpha", {"INTEGER", "PRIMARY KEY"}}, {"beta", {"VARCHAR", ""}}, {"gamma", {"VARCHAR", ""}}, {"delta",