From 4005685631046555052
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109fba,ac06fef48c3c04df
X-Google-Attributes: gid109fba,public
X-Google-Thread: f78e5,ac06fef48c3c04df
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1995-01-22 11:07:15 PST
Newsgroups: comp.lang.c++,comp.std.c++
Path: nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!vixen.cso.uiuc.edu!uwm.edu!msunews!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!news
From: maxtal@physics.su.OZ.AU (John Max Skaller)
Subject: Re: friends and local classes
Message-ID: <D2tMG4.F83@ucc.su.OZ.AU>
Sender: news@ucc.su.OZ.AU
Nntp-Posting-Host: physics.su.oz.au
Organization: School of Physics, University of Sydney, Australia
References: <3frgln$deh@senator-bedfellow.MIT.EDU> <3froli$gss@news.panix.com>
Date: Sun, 22 Jan 1995 19:07:15 GMT
Lines: 26
Xref: nntp.gmd.de comp.lang.c++:87458 comp.std.c++:11215

In article <3froli$gss@news.panix.com> Viktor Yurkovsky <n4mation@panix.com> writes:
>inside that function should have access.  However, there are some
>interesting problems stemming from that such as: if this function
>now calls a function in another class, does it pass the friendship
>factor on?

	No.
>
>Is friend dynamically or statically bound, really?

	Friendship is statically enforced. However, there is
a difference between static protection (including
friendship) and _dynamic_ accessibility.

	A friend or member, for example, can grant access to the
private details of an object to the public, or a specific
function, by simply passing a pointer to the private member.

	There is only one way to stop this that I know of:
ensure the private member is of a _private type_.

--
        JOHN (MAX) SKALLER,         INTERNET:maxtal@suphys.physics.su.oz.au
	Maxtal Pty Ltd,		    
        81A Glebe Point Rd, GLEBE   Mem: SA IT/9/22,SC22/WG21 
        NSW 2037, AUSTRALIA	    Phone: 61-2-566-2189


