This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]