Created on 2002-05-16.00:00:00 last changed 33 months ago
[Voted into the WP at the March, 2011 meeting as paper N3259.]
Proposed resolution (February, 2011):
The proposed resolution will be submitted as a separate document.
Suggested resolution:
It would simplify the grammar, and apparently better reflect existing practice, to factor the global-scope operator into the rule for nested-name-specifier.
In looking at a large handful of core issues related to elaborated-type-specifiers and the naming of classes in general, I discovered an odd fact. It turns out that there is exactly one place in the grammar where nested-name-specifier is not immediately preceded by "::opt": in class-head, which is used only for class definitions. So technically, this example is ill-formed, and should evoke a syntax error:
struct A; struct ::A { };
However, all of EDG, GCC and Microsoft's compiler accept it without a qualm. In fact, I couldn't get any of them to even warn about it.
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-02-18 07:47:23 | admin | set | messages: + msg6684 |
2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
2011-04-10 00:00:00 | admin | set | messages: + msg3352 |
2011-04-10 00:00:00 | admin | set | status: tentatively ready -> fdis |
2011-02-28 00:00:00 | admin | set | status: drafting -> tentatively ready |
2010-08-23 00:00:00 | admin | set | status: review -> drafting |
2008-02-03 00:00:00 | admin | set | messages: + msg1580 |
2008-02-03 00:00:00 | admin | set | status: open -> review |
2002-05-16 00:00:00 | admin | create |