I'm trying to create the following data structure in Qt 4.5 in C++:
QMap<int, QMap<QString, QVector<QPointF> > > animation;
However, the inclusion of this line in my code results in the following error:
cc1plus: warnings being treated as errors
In file included from XXX/XXX/XXX/MainWindow.qt.C.tmp.C:113:
/usr/lib/qt4/include/QtCore/qmap.h: In member function ‘void MainWindow::exportAnn()’:
/usr/lib/qt4/include/QtCore/qmap.h:588: error: dereferencing pointer ‘y’ does break strict-aliasing rules
/usr/lib/qt4/include/QtCore/qmap.h:586: note: initialized from here
Command exited with non-zero status 1
My organization requires me to treat all warnings as errors, so I can't simply ignore this. Is this a bug in Qt, or is there something I'm doing wrong?