Topic: Scope of fwd declaratoins of nested classe
Author: schuenem@informatik.tu-muenchen.de (Ulf Schuenemann)
Date: 1995/12/21 Raw View
In article <4apjod$7tp@engnews1.eng.sun.com>, clamage@Eng.Sun.Com (Steve Clamage) writes:
|> 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;
|> > };
|> >};
|>
|> An example just like yours appears in the draft to illustrate the error.
The only way I see to hide the definition of a public nested class
is to put it into a different translation unit.
// public header
class A {
public:
class B;
};
// implementation file for class A
class A::B {
public:
int b;
};
Ulf Schuenemann
--------------------------------------------------------------------
,_. Ulf Schuenemann
#, \ Fakultaet fuer Informatik, Technische Universitaet Muenchen, Germany.
| > email: schuenem@informatik.tu-muenchen.de
v=-< WWW: http://hphalle2.informatik.tu-muenchen.de/~schuenem/
---
[ 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. ]