Clarification regarding a non-bug in gcc.gnu.org

Nathan Sidwell nathan@codesourcery.com
Wed Aug 20 12:11:00 GMT 2003


Bjarne,

you replied to S Hariharan, with
 > You are right. That example is an error. Please refer them to section 9.7 of the
 > standard

I'll see your 9.7 and raise you DR 45 :)

DR 45 is mentioned at the very place S Hariharan talks about, for precisely
this reason.

nathan


-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
          The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk


Hariharan S wrote:
> Hi,
> I visited gcc.gnu.org page. In that page under the heading Non-bugs it is 
> written that "Nested classes can access private types of the containing 
> class". This is incorrect and I referred the book C++ Primer by Stanley B. 
> Lippman & Josie Lajoie. I also sent a mail to Bjarne Stroustrup regarding 
> this. He also said that what is given in the webpage is incorrect. He 
> asked you to refer section 9.7 of the standard. Given below is the reply 
> to my question regarding this. If my understanding of the statement in the 
> page is incorrect please give me an example.
> Regards,
> Hariharan S
> 
> ---------- Forwarded message ----------
> Date: Sat, 9 Aug 2003 16:50:09 -0400 (EDT)
> From: Bjarne Stroustrup <bs@research.att.com>
> To: hariharan@csa.iisc.ernet.in
> Subject: Re: Doubt in C++
> 
> 
> 
>>Date: Thu, 7 Aug 2003 23:14:31 +0530 (IST)
>>From: Hariharan S <hariharan@csa.iisc.ernet.in>
>>To: bs@research.att.com
>>Subject: Doubt in C++
> 
> 
>>Dear Mr. Stroustrup,
>>I visited http://gcc.gnu.org/bugs.html#known. In that page under the 
>>heading Non-bugs it is written that "Nested classes can access private 
>>types of the containing class".
>>
>>class Nesting
>>{
>>int a;
>>class Nested
>>{
>>void foo();
>>};
>>};
>>
>>i.e., in the above code foo() can access Nesting::a. I think gnu is wrong. 
>>Please clarify.
>>Regards,
>>Hariharan S
>>
>>
> 
> 
> You are right. That example is an error. Please refer them to section 9.7 of the 
> standard
> 
> 
> 	- Bjarne
> Bjarne Stroustrup, http://www.research.att.com/~bs 
> 
> 
> 



More information about the Gcc-bugs mailing list