Commit 95e0e0742e uses a C++0x feature and breaks compilation with gcc < 4.5
Lambert CLARA
lambert.clara at yahoo.fr
Wed Oct 26 12:32:35 UTC 2011
Hello,
It seems that in the method MainWindowPrivate::slotDockShown of mainwindow_p.cpp, declaring the local struct ShownToolViewFinder and use it as argument of walkToolViews is only possible in C++0x and since gcc 4.5.
Quote from http://gcc.gnu.org/gcc-4.5/changes.html :
"In C++0x mode local and anonymous classes are now allowed as template arguments, and in declarations of variables and functions with linkage, so long as any such declaration that is used is also defined (DR 757)."
If we want to keep the compatibility with old gcc (mine is 4.4.5), and/or limit the use of C++0x in kdevelop source code, a simple dirty fix would be to move the struct definition just above the function.
I can send a patch, but I'd prefer having your opinion first.
Thanks, regards,
Lambert
More information about the KDevelop-devel
mailing list