Closed
Description
Bugzilla Link | 17585 |
Version | unspecified |
OS | Linux |
CC | @DougGregor,@zygoloid |
Extended Description
consider:
void foo() {
template <typename> int i;
}
we issue:
error: expected expression
gcc provides a better error:
error: a template declaration cannot appear at block scope
another case:
void foo() {
struct S { template <typename> int i; };
}
we issue:
error: member 'i' declared as a template
gcc provides:
invalid declaration of member template in local class
These plain english messages are very nice, we should do something similar.