Created on 2024-03-19.00:00:00 last changed 17 months ago
CWG 2024-05-17
Duplicate of issue 2874.
Suggested resolution:
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: ...
(From submission #521.)
Consider:
namespace N
{
template<typename T>
struct A;
}
template<>
struct N::A<int>; // #1
template<typename T>
struct N::A<T*>; // #2
#1 is currently well-formed, but #2 is an ill-formed use of an elaborated-type-specifier. This is inconsistent and not aligned with implementation practice.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2024-05-17 22:24:28 | admin | set | messages: + msg7703 |
| 2024-05-17 22:24:28 | admin | set | status: open -> dup |
| 2024-04-25 19:29:08 | admin | set | messages: + msg7680 |
| 2024-03-19 00:00:00 | admin | create | |