Created on 2010-10-13.00:00:00 last changed 131 months ago
[Voted into the WP at the March, 2011 meeting as part of paper N3262.]
According to 6.4.2 [basic.scope.pdecl] paragraph 6,
for an elaborated-type-specifier of the form
class-key identifier
if the elaborated-type-specifier is used in the decl-specifier-seq or parameter-declaration-clause of a function defined in namespace scope, the identifier is declared as a class-name in the namespace that contains the declaration; otherwise, except as a friend declaration, the identifier is declared in the smallest non-class, non-function-prototype scope that contains the declaration.
This should have been, but was not, updated when enumeration scope (6.4.8 [basic.scope.enum]) was added:
enum class E { e = sizeof((struct S*)0) };
Presumably the name S belongs to the same scope as E, not the enumeration scope of E.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
2011-04-10 00:00:00 | admin | set | messages: + msg3292 |
2011-04-10 00:00:00 | admin | set | status: drafting -> fdis |
2010-11-29 00:00:00 | admin | set | status: open -> drafting |
2010-10-13 00:00:00 | admin | create |