🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2929

Re: Scope of fwd declaratoins of nested classe

#2929
From: Steve Clamage
Date: Thu, 14 Dec 1995 16:59
28 lines
1398 bytes
In article 95Dec14120500@dame.bby.com.au, gnb@bby.com.au (Gregory Bond) writes:
>
>class A {
>  public:
>	class B;
>  private:
>	class B {
>	  public:
>		int b;
>	};
>};
>
>// Is A::B visible here? Or is the above declaration ill-formed?

From the September draft, 11.1 "Access specifiers", paragraph 3:

"When a member is redeclared within its class definition, the access
specified at its redeclaration shall be the same as at its initial
declaration."

An example just like yours appears in the draft to illustrate the error.

---
Steve Clamage, stephen.clamage@eng.sun.com

[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <4apjod$7tp@engnews1.eng.sun.com>
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage
References: <GNB.95Dec14120500@dame.bby.com.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage
From: clamage@Eng.Sun.Com (Steve Clamage)
Newsgroups: comp.std.c++
Subject: Re: Scope of fwd declaratoins of nested classe
Date: 14 Dec 1995 16:59:22 GMT
Organization: Sun Microsystems Inc.
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <4apjod$7tp@engnews1.eng.sun.com>
References: <GNB.95Dec14120500@dame.bby.com.au>
Reply-To: clamage@Eng.Sun.Com
NNTP-Posting-Host: taumet.eng.sun.com
Content-Type: text
X-Nntp-Posting-Host: taumet.eng.sun.com
Content-Length: 579
X-Lines: 26
Originator: clamage@taumet