Article View: comp.std.c++
Article #3779Re: Forward declaration of class member functions
From: John E. Potter
Date: Fri, 22 Mar 1996 17:29
Date: Fri, 22 Mar 1996 17:29
42 lines
2060 bytes
2060 bytes
Ron Burk (RonBurk@msn.com) wrote:
: I am having difficulty finding language in the draft
: that establishes the legality or illegality of the following:
: class Forward;
: class Any {
: friend int Forward::SomeFunc(int SomeArg);
: };
: It certainly seems like a useful construct, and I don't
: see any impossibility in implementing it
Not enough of a lawyer to find it; however, the basic idea is that you can
not talk about the inside of something that has not been seen. But I do
see some problems. Let's add a little bit more from another thread
with discussion of a camel's nose inside of the tent.
class Forward::Node; // also illegal
Forward::Node* ptr;
...
class Forward {
private :
class Node {
// ...
};
int SomeFunc(int SomeArg);
};
Now what? You can not talk about a private nested class. You can't call
a private member function. Can you make it a friend? What is the big
picture here?
Enjoy,
John
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]
Technical Details
Message-ID:
<4iu3mn$t15@jake.esu.edu>Path:
arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austernReferences:
<UPMAIL07.199603182248040068@msn.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austern From: jpotter@falcon.lhup.edu (John E. Potter) Newsgroups: comp.std.c++ Subject: Re: Forward declaration of class member functions Date: 22 Mar 1996 09:29:25 PST Organization: East Stroudsburg University, Pennsylvania Approved: austern@isolde.mti.sgi.com Message-ID: <4iu3mn$t15@jake.esu.edu> References: <UPMAIL07.199603182248040068@msn.com> NNTP-Posting-Host: isolde.mti.sgi.com X-Original-Date: 22 Mar 1996 11:42:15 GMT X-Newsreader: TIN [version 1.2 PL2] X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBMVLjj0y4NqrwXLNJAQHK/AH+NnD9WGPguUnLic0QVQ9do/P/iq5QtY8L wnq4+V1h2QlTCinQ69S9aFQkz3g9slVVfnFnLwQpfCsTuFZjtNH4XQ== =1PZP Originator: austern@isolde.mti.sgi.com