cplusplus / CWG

Core Working Group
23 stars 7 forks source link

CWG2862 [temp.pre] p2 "declares" cannot convey the intent #437

Open xmh0511 opened 9 months ago

xmh0511 commented 9 months ago

Full name of submitter (unless configured in github; will be published with the issue): Jim X

[temp.pre] p2 says

The declaration in a template-declaration (if any) shall

  • declare or define a function, a class, or a variable, or

Consider this case

template<class T>
typedef struct C F; 

This example is rejected by implementations. However, the declaration in the template-declaration does declare the class C anyway.

Suggested Resolution

We should be more elaborate about the declaration.

jensmaurer commented 4 months ago

CWG2862