From -6417841547160513109
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109fba,51c25ee341635166
X-Google-Attributes: gid109fba,public
X-Google-Thread: f78e5,1061a88048bb29b2,start
X-Google-Attributes: gidf78e5,public
From: "Brian T. Hill" <bhil@strata3d.com>
Subject: Re: inherited:: keyword
Date: 1995/04/24
Message-ID: <3nggfn$sk3@stellar.comnet.com>#1/1
X-Deja-AN: 101757462
references: <3n4lpp$iks@nkosi.well.com> <D7IBDA.IMv@cix.compulink.co.uk>
content-type: text/plain; charset=iso-8859-1
organization: Utah Wired
x-url: news:D7IBDA.IMv@cix.compulink.co.uk
mime-version: 1.0
newsgroups: comp.lang.c++,comp.std.c++
x-mailer: Mozilla 1.1b2 (Macintosh; I; PPC)

xqp@cix.compulink.co.uk ("Martin Jenkins") wrote:

>> I've come across the following syntax in some mac code,
>> both metroworks and mac app:

>> cName::cName()
>> {
>> .
>> .
>> .
>> inherited::f();
>> }

>> cName is a derived class,
>> "inherited is not a class name anywhere,
>> (I searched the entire OS),
>> and f is a function of the base class.

>> I assume that this syntax will find the function f
>> somewhere in the class hierarchy, howver I cannot find any
>> reference to this syntax anywhere.

>> Is this something new or some mac extension, or what ?

>Look at p205 of the 2nd edition of Stroustrup. In the index as 
>"inherited::".

I've come across this too.  I've read Stroustrup's suggestion and I 
understand what it means when I see it.  But when did it become a part 
of the language per se?  Stroustrup suggests using a typedef to define 
the keyword, yet Metrowerks seems to use it without the typedef.

Can we expect to see this in other C++ implementations?  I personally 
prefer the compiler to define the keyword.  If the programmer defines 
it, there can be no guarantee that it actually refers to the superclass.
---------------------------
Brian T. Hill
bhil@strata3d.com
http://park.uvsc.edu/~bhil/





