typedef-name: identifier simple-template-id
using handler_t = void (*)(int); extern handler_t ignore; extern void (*ignore)(int); // redeclare ignore using cell = pair<void*, cell*>; // error— end example
typedef struct s { /* ... */ } s; typedef int I; typedef int I; typedef I I;— end example
struct S { typedef struct A { } A; // OK typedef struct B B; // OK typedef A A; // error };— end example
struct S; typedef struct S S; int main() { struct S* p; // OK } struct S { }; // OK— end example
class complex { /* ... */ }; typedef int complex; // error: redefinition— end example
typedef int complex; class complex { /* ... */ }; // error: redefinition— end example
struct S { S(); ~S(); }; typedef struct S T; S a = T(); // OK struct T * p; // error— end example
typedef struct { } *ps, S; // S is the class name for linkage purposes typedef decltype([]{}) C; // the closure type has no name for linkage purposes— end example
typedef struct { int f() {} } X; // error: struct with typedef name for linkage has member functions— end example