From -1432023180080248026
X-Google-Thread: f78e5,51456c3eb8f9490e
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.hanau.net!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: hofmann@anvil-soft.com ("Matthias Hofmann")
Newsgroups: comp.std.c++
Subject: Re: Copy Constructor Confusion!
Date: Thu, 17 Aug 2006 17:58:27 GMT
Lines: 36
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <4kjo9uFcihf4U1@individual.net>
References: <1155645873.296811.3890@74g2000cwt.googlegroups.com>   <hPkEg.12700$j7.324766@news.indigo.ie>   <ebsor6$jbq$1@news.datemas.de>   <1155663179.843769.44420@b28g2000cwb.googlegroups.com>   <4kh3o8Fc528lU1@individual.net> <1155753523.459377.147180@m79g2000cwm.googlegroups.com>
NNTP-Posting-Host: news.news.demon.net
X-Trace: news.demon.co.uk 1155837512 9986 158.152.254.254 (17 Aug 2006 17:58:32 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Thu, 17 Aug 2006 17:58:32 +0000 (UTC)
X-Original-To: std-c++@mailman.ucar.edu
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-Priority: 3
X-Orig-X-Trace: individual.net ImCUWwIFkJHe19fTjLGhYwNjHSCfk42gP67c/ZFOPiEP8wTtbv
X-RFC2646: Format=Flowed; Original
X-Virus-Scanned: amavisd-new at csse.unimelb.edu.au
X-MSMail-Priority: Normal
X-Originating-IP: 130.133.1.2
X-Received: (from fjh@localhost)
	by mulga.csse.unimelb.edu.au (8.13.6+Sun/8.13.6/Submit) id k7HHwRSw004392;
	Fri, 18 Aug 2006 03:58:27 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-Delivered-To: std-c++@mailman.ucar.edu
X-Authentication-Warning: mulga.csse.unimelb.edu.au: fjh set sender to devnull@stump.algebra.com using -f
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-Newsgroups: comp.std.c++
Xref: g2news2.google.com comp.std.c++:3324

"mark" <markw65@gmail.com> schrieb im Newsbeitrag 
news:1155753523.459377.147180@m79g2000cwm.googlegroups.com...

>> >> If it appears inside a member of a derived class, "protected" should
>> >> suffice.
>> >
>> > Really?
>>
>> Yes, see section 11/1: "A member of a class can be [...] protected; that 
>> is,
>> its name can be used only by members and friends of the class in which it 
>> is
>> declared, and by members and friends of classes derived from this class."
>
> You left off the important part of the sentence (see 11.5), which says:
>
> . Except when forming a pointer to member (5.3.1), the access must be
> through a pointer to, reference to, or object of the derived class
> iteself (or any class derived from that class) (5.2.5).

Yes, that's true. A protected member can be accessed only if those 
conditions you mentioned are also met.

-- 
Matthias Hofmann
Anvil-Soft, CEO
http://www.anvil-soft.com - The Creators of Toilet Tycoon
http://www.anvil-soft.de - Die Macher des Klomanagers


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



