Created on 2003-06-25.00:00:00 last changed 197 months ago
[Voted into WP at March 2004 meeting.]
Proposed resolution (October 2003):
At the end of 9.2.4 [dcl.typedef] paragraph 2, add the following:
In a given class scope, a typedef specifier can be used to redefine any class-name declared in that scope that is not also a typedef-name to refer to the type to which it already refers. [Example:struct S { typedef struct A {} A; // OK typedef struct B B; // OK typedef A A; // error };]
I wonder if perhaps the core issue 56 change in 9.2.4 [dcl.typedef] paragraph 2 wasn't quite careful enough. The intent was to remove the allowance for:
struct S { typedef int I; typedef int I; };
but I think it also disallows the following:
class B { typedef struct A {} A; void f(struct B::A*p); };
See also issue 407.
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2004-04-09 00:00:00 | admin | set | messages: + msg1010 |
2004-04-09 00:00:00 | admin | set | status: ready -> wp |
2003-11-15 00:00:00 | admin | set | messages: + msg912 |
2003-11-15 00:00:00 | admin | set | status: open -> ready |
2003-06-25 00:00:00 | admin | create |