This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Microsoft Specific C++ keyword "__super"
I like that solution Phil, as Joe says it may not work for multiple
inheritance but I can live with that, my class hierarchies are not that
complicated.
Ta,
Richard e Collins
www.maddoggames.com
----- Original Message -----
From: "Phil Edwards" <phil@codesourcery.com>
To: "Richard E Collins" <richard@collins1969.fsnet.co.uk>
Cc: <gcc@gcc.gnu.org>
Sent: Wednesday, August 25, 2004 11:09 PM
Subject: Re: Microsoft Specific C++ keyword "__super"
> On Wed, Aug 25, 2004 at 07:14:53PM +0100, Richard E Collins wrote:
> >
> > I'll have a think, I may resort to a macro plan I had before I found the
> > '__super' keyword. I do think its an omission of the C++ spec.
>
> You may or may not know that it was proposed and rejected. They were
> reluctant to use up any more keywords, even from the implementation
> namespace, when the same result can be had with a little more coding:
>
> struct Derived1
> : public Some_Complicated_Base_Probably_Involving_Templates
> {
> typedef Some_Complicated_Base_Probably_Involving_Templates parent;
> ....
> };
>
> struct Derived2 : public Derived1
> {
> typedef Derived1 parent;
> ....
> };
>
> and so forth.
>
> <insert all the usual arguments about repeated code and getting out of
sync
> and it's not that much extra work and generating both lines with macros
and
> on and on and on>
>
>
> --
> Debugging is twice as hard as writing the code in the first place.
> Therefore, if you write the code as cleverly as possible, you are,
> by definition, not smart enough to debug it.
> - Brian W. Kernighan, in a plea for clear, straightforward code
>