Created on 2024-03-19.00:00:00 last changed 4 months ago
Proposed resolution (approved by CWG 2024-05-17):
Change in 9.2.9.5 [dcl.type.elab] paragraph 2 as follows:
If an elaborated-type-specifier is the sole constituent of a declaration, the declaration is ill-formed unless it is an explicit specialization (13.9.4 [temp.expl.spec]), a partial specialization (13.7.6 [temp.spec.partial]), an explicit instantiation (13.9.3 [temp.explicit]), or it has one of the following forms:class-key attribute-specifier-seqopt identifier ; class-key attribute-specifier-seqopt simple-template-id ;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 (13.9.4 [temp.expl.spec]) or in a template-declaration (where it declares a partial specialization(13.7 [temp.decls]). The attribute-specifier-seq, if any, appertains to the class or template being declared.
[Accepted as a DR at the June, 2024 meeting.]
(From submission #521.)
Consider:
namespace N { template<typename T> struct A; } template<> struct N::A<int>; // OK template<typename T> struct N::A<T*>; // error: invalid use of elaborated-type-specifier with a qualified-id
However, all major implementations support this.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-07-20 13:52:34 | admin | set | status: ready -> dr |
2024-06-27 04:25:11 | admin | set | status: tentatively ready -> ready |
2024-05-17 22:24:28 | admin | set | status: open -> tentatively ready |
2024-03-19 19:32:53 | admin | set | messages: + msg7643 |
2024-03-19 00:00:00 | admin | create |