Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #79137
| From | Andrey Tarasevich <andreytarasevich@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Injected class name |
| Date | 2021-04-21 06:29 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <s5p9bm$1ab$1@dont-email.me> (permalink) |
| References | <s5k6tc$cm$1@dont-email.me> <ie5v3oF8lk9U1@mid.individual.net> <s5ks9i$7mp$1@dont-email.me> <s5ntrb$nt0$1@dont-email.me> <s5nvhq$kjf$1@gioia.aioe.org> |
On 4/20/2021 6:35 PM, Christian Hanné wrote:
>>> ... or one can use an elaborated type specifier
>>> class C : B
>>> {
>>> class A *p;
>>> };
>>> which apparently simply ignores access restrictions.
>
>> Scratch that. This appears to be a bug in GCC. Neither Clang nor MSVC
>> allow that.
>
> No, that's perfectly legal code !
Sorry, but a mere "that's perfectly legal code" will not fly here with me.
If you claim that a private name `A` should be accessible here through
elaborated type specifier `class A` (and that Clang and MSVC are wrong
in rejecting this code), you need to explain in detail what makes you
think so. You need to quote the C++ standard.
--
Best regards,
Andrey Tarasevich
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Injected class name Andrey Tarasevich <andreytarasevich@hotmail.com> - 2021-04-19 08:16 -0700
Re: Injected class name Bo Persson <bo@bo-persson.se> - 2021-04-19 20:05 +0200
Re: Injected class name Andrey Tarasevich <andreytarasevich@hotmail.com> - 2021-04-19 14:21 -0700
Re: Injected class name Andrey Tarasevich <andreytarasevich@hotmail.com> - 2021-04-20 18:06 -0700
Re: Injected class name Christian Hanné <the.hanne@gmail.com> - 2021-04-21 03:35 +0200
Re: Injected class name Andrey Tarasevich <andreytarasevich@hotmail.com> - 2021-04-21 06:29 -0700
Re: Injected class name Richard Damon <Richard@Damon-Family.org> - 2021-04-21 09:54 -0400
Re: Injected class name Andrey Tarasevich <andreytarasevich@hotmail.com> - 2021-04-21 07:35 -0700
Re: Injected class name Andrey Tarasevich <andreytarasevich@hotmail.com> - 2021-04-21 07:48 -0700
Re: Injected class name Andrey Tarasevich <andreytarasevich@hotmail.com> - 2021-04-19 11:34 -0700
Re: Injected class name "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-21 15:45 -0700
csiph-web