http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57312
Bug ID: 57312
Summary: missing 'template' keyword not diagnosed
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
This should be rejected:
template<class T>
struct A {
template<class U>
void send(int i) { }
};
template<class T>
struct B {
template<class U>
void send(int i) { a.send<U>(i); }
// ^ missing template
A<T> a;
};
int main()
{
B<int> b;
b.send<char>(0);
}
Clang rejects this.