If an elaborated-type-specifier is the sole constituent of a declaration, the declaration is ill-formed unless it is an explicit specialization, an explicit instantiation or it has one of the following forms:
In the first case, the elaborated-type-specifier declares the identifier as a class-name. The second case shall appear only in an explicit-specialization or in a template-declaration (where it declares a partial specialization}.
If an elaborated-type-specifier is the sole constituent of a declaration, the declaration is ill-formed unless it is an explicit specialization, a partial specialization, an explicit instantiation or it has one of the following forms [...]
Full name of submitter (unless configured in github; will be published with the issue): Krystian Stasiowski
Reference (section label): [dcl.type.elab]
Link to reflector thread (if any): N/A
Issue description:
[dcl.type.elab] p2 states:
Consider the following:
The current wording permits the elaborated-type-specifier of
#1
to contain a nested-name-specifier. However,#2
is ill-formed because it:Clang, GCC, EDG, and MSVC all accept the declaration of
#2
. Presumably, this is an oversight in the wording.Suggested resolution:
Modify [dcl.type.elab] p2 as follows: