Topic: typedef within class (special case)
Author: rfg@netcom.com (Ronald F. Guilmette)
Date: Mon, 29 Aug 1994 09:49:22 GMT Raw View
In article <33cu84$96j@savagem.mitel.com> savagem@software.mitel.com (Martin Savage) writes:
>Should this typedef be allowed?
>
>
>class x {
> typedef x *y;
>};
>
>main()
>{
>}
>
>g++ version 2 will take it, but not version 2.4 and 2.5.8.
>Is it a bug in those versions?
I believe so, yes.
The name `x' should be known as a type name immediately after the compiler
sees the initial `class x'.
--
-- Ron Guilmette, Sunnyvale, CA ---------- RG Consulting -------------------
---- domain addr: rfg@netcom.com ----------- Purveyors of Compiler Test ----
---- uucp addr: ...!uunet!netcom!rfg ------- Suites and Bullet-Proof Shoes -