[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: non-g++ compilation error in kapplication.cpp
From: Albert Chin <kde-devel () thewrittenword ! com>
Date: 2002-01-31 7:18:47
[Download RAW message or body]
On Wed, Jan 30, 2002 at 07:13:42PM +0100, Lubos Lunak wrote:
> On Wed 30. January 2002 14:55, Thomas Leitner wrote:
> > like that:
> [snip]
> > cxx: Error: ./kicontheme.h, line 72: nonmember operator requires a
> > parameter
> > with class type (noprmclstyp)
> > inline KIcon::Group& operator++(KIcon::Group& group) { group =
> > static_cast<KIcon::Group>(group+1); return group; }
> > ---------------------^
> > cxx: Error: ./kicontheme.h, line 73: nonmember operator requires a
> > parameter
> > with class type (noprmclstyp)
> > inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret
> > = group; ++group; return ret; }
> > --------------------^
> > cxx: Error: ./kicontheme.h, line 73: enumerated type is not allowed
> > (enumtyp)
> > inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret
> > = group; ++group; return ret; }
> > ---------------------------------------------------------------------------
> >-----------^ cxx: Info: 3 errors detected in the compilation of
> > "kapplication.cpp".
> >
> > Any fix anyone?
> >
>
> Yes ... using an ANSI/ISO C++ capable compiler? The code above should be
> perfectly correct C++, and IIRC e.g. Borland C++ supported it even before the
> newest things like 'mutable' or 'explicit' came. Can your compiler compile
> the attached piece of code (with or without the '#if 0' )?
Removing the #if/#endif pair, Compaq C++ V6.3-018 compiles the code.
--
albert chin (china@thewrittenword.com)
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic