Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!sunic!tut!tukki!sakkinen From: sakkinen@tukki.jyu.fi (Markku Sakkinen) Newsgroups: comp.lang.c++ Subject: Re: Protected members Message-ID: <2219@tukki.jyu.fi> Date: 30 Nov 89 08:36:51 GMT References: <1989Nov28.122925.20804@newcastle.ac.uk> <1111@mit-amt.MEDIA.MIT.EDU> <2218@tukki.jyu.fi> Reply-To: sakkinen@jytko.jyu.fi (Markku Sakkinen) SAKKINEN@FINJYU.bitnet (alternative) Organization: University of Jyvaskyla, Finland Lines: 13 Sorry, I posted the previous article without thinking about this: _If_ the trick suggested at the end (deriving from a dummy friend class) works, then of course B gains access to private members of A as well. This is an unwanted consequence. Perhaps a "half-friend" declaration should be added to C++, allowing access to protected but not to private members ('acquaintance' has been pre-empted for other purposes :-) ). Markku Sakkinen Department of Computer Science University of Jyvaskyla (a's with umlauts) Seminaarinkatu 15 SF-40100 Jyvaskyla (umlauts again) Finland