Details
-
Bug
-
Resolution: Duplicate
-
P4: Low
-
None
-
5.0.2
-
None
-
Windows 7, VS2010
Description
Setting the warning level to 4 on VC2010 produces warning C4718 with QMap when the key and value are of C++ data type:
1>d:\5.0.2\include\qtcore\qmap.h(234): warning C4718: 'QMapNode<int,int>::destroySubTree' : recursive call has no side effects, deleting 1>d:\5.0.2\include\qtcore\qmap.h(332): warning C4718: 'QMapNode<int,int>::destroySubTree' : recursive call has no side effects, deleting 1>d:\test\main.cpp(8): warning C4718: 'QMapNode<int,int>::destroySubTree' : recursive call has no side effects, deleting 1>d:\test\main.cpp(17): warning C4718: 'QMapNode<int,int>::destroySubTree' : recursive call has no side effects, deleting
This was not the case with Qt 4. With a Qt class, like QString, the warning is not displayed.
The code below can be used to reproduce the issue.
#include <QtCore/QCoreApplication> #include <QtCore/QMap> class Test { public: Test() {} ~Test() {} QMap<int, int> m; }; int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); Test t; return a.exec(); }
Attachments
Issue Links
- duplicates
-
QTBUG-46649 MSVC warnings 4718 and 4127 in QMapData
-
- Closed
-