Commit 95e0e0742e uses a C++0x feature and breaks compilation with gcc < 4.5

Milian Wolff mail at milianw.de
Wed Oct 26 12:44:59 UTC 2011


Lambert CLARA, 26.10.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.

just move it out of the function into the global .cpp space

bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20111026/60bc7398/attachment-0001.sig>


More information about the KDevelop-devel mailing list