Version: (using KDE Devel) Installed from: Compiled sources Compiler: gcc 3.4.3 OS: Linux kdebindings fails to compile for me in the smoke/kde directory because the automatically-generated x_7.cpp has the following: void x_81(Smoke::Stack x) const { // fallbackAccessKeysAssignments() QValueList<QPair<QString, QChar>> xret = this->KHTMLSettings::fallbackAccessKeysAssignments(); x[0].s_voidp = (void*)new QValueList<QPair<QString, QChar>>(xret); } Which gives this compile message: x_7.cpp: In member function `void x_KHTMLSettings::x_81(Smoke::StackItem*) const': x_7.cpp:4883: error: `xret' undeclared (first use this function) x_7.cpp:4883: error: (Each undeclared identifier is reported only once for each function it appears in.) x_7.cpp:4883: error: `this' cannot appear in a constant-expression x_7.cpp:4883: error: '->' cannot appear in a constant-expression x_7.cpp:4883: error: a function call cannot appear in a constant-expression x_7.cpp:4883: error: an assignment cannot appear in a constant-expression x_7.cpp:4883: error: `>>' should be `> >' within a nested template argument list x_7.cpp:4884: error: `xret' cannot appear in a constant-expression x_7.cpp:4884: error: `>>' should be `> >' within a nested template argument list make: *** [x_7.lo] Error 1 I tried looking at kalyptus but couldn't make sense of it. :( Changing x_7.cpp so that the '>>' nested templates are '> >' fixed the compile error.
On Sunday 08 May 2005 10:20, Michael Pyne wrote: [bugs.kde.org quoted mail] I would have said this was a compiler bug. But on the other hand there is even a special error message about '>>' needing to be '> >' within a nested template argument. Yuck, how arbitrary! So I'll fix the bug by adding a suitable space for types ending in '>>'. I haven't switched to subversion yet, so it might be a day or two. -- Richard
It's neither a bug, nor arbitrary. Under the longest-match rule, >> is a single token -- the right-shift operator
Yes, it's even in the C++ std AFAIK. It's been a warning since I've used g++, but I guess g++ 3.4 upgraded it to an error.
SVN commit 411417 by rdale: * Fixes bug reported by Michael Payne where the code for a nested template return type was being generated incorrectly. The type 'QValueList<QPair<QString, QChar> >' must have a space between the closing angle brackets. CCBUGS: 105277 M +1 -0 trunk/KDE/kdebindings/kalyptus/kalyptusDataDict.pm --- trunk/KDE/kdebindings/kalyptus/kalyptusDataDict.pm #411416:411417 @@ -2950,6 +2950,7 @@ } # normalize $argType = $before."<".join( ", ", @args).">".$after; + $argType =~ s/>>/> >/g; # Nested template types must have a space } # Parse 'const' in front of it, and '*' or '&' after it
On Monday 09 May 2005 10:45, Richard Dale wrote: > * Fixes bug reported by Michael Payne where the code for a nested > template return type was being generated incorrectly. Oops, sorry that should be Michael Pyne of course
Fixed long ago.