home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!decwrl!borland.com!pete
- From: pete@genghis.borland.com (Pete Becker)
- Newsgroups: comp.lang.c++
- Subject: Re: Inherited nested classes?
- Message-ID: <1992Aug31.180702.29843@genghis.borland.com>
- Date: 31 Aug 92 18:07:02 GMT
- References: <1992Aug29.160423.16617@genghis.borland.com> <4902@holden.lulea.trab.se> <1894@acf5.NYU.EDU>
- Sender: news@borland.com (News Admin)
- Organization: Borland International
- Lines: 28
- Originator: pete@genghis.borland.com
-
- In article <1894@acf5.NYU.EDU> checker@acf5.NYU.EDU (checker) writes:
- >jbn@lulea.trab.se (Johan Bengtsson) writes:
- >>Are private nested types useful at all, given the current language definition?
- >
- >Huh? How else would you have the access control work? Of course they
- >are useful:
- >
- >class list
- >{
- >public:
- > // ...
- >private:
- > class list_node
- > {
- > // ...
- > }
- >
- > list_node *pHead;
- >};
- >
- >Chris
-
- This example omits the most interesting part: members of list_node that
- try to use the name 'list_node'. Since it's private in list, and list_node is
- not a member function of list, members of list_node cannot access the name
- list_node. Which makes almnost all useful code illegal. But that's clearly
- a flaw in the wording, and not the intention of the language.
- -- Pete
-