[dcl.typedef]/8
A simple-template-id is only a typedef-name if its template-name names an alias template or a template template-parameter.
[Note 1: A simple-template-id that names a class template specialization is a class-name ([class.name]). If a typedef-name is used to identify the subject of an elaborated-type-specifier ([dcl.type.elab]), a class definition, a constructor declaration, or a destructor declaration, the program is ill-formed. — end note]
[Example 8:
struct S {
S();
~S();
};
typedef struct S T;
S a = T(); // OK
struct T * p; // error
— end example]
I presume the sentence highlighted above explains the error. But I'm not sure I understand what do they mean by that sentence.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…