| 1 |
// RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify %s |
| 2 |
|
| 3 |
template <typename> |
| 4 |
void quux(); |
| 5 |
|
| 6 |
void fun() { |
| 7 |
struct foo { |
| 8 |
template <typename> struct bar {}; // expected-error{{templates cannot be declared inside of a local class}} |
| 9 |
template <typename> void baz() {} // expected-error{{templates cannot be declared inside of a local class}} |
| 10 |
template <typename> void qux(); // expected-error{{templates cannot be declared inside of a local class}} |
| 11 |
template <typename> using corge = int; // expected-error{{templates cannot be declared inside of a local class}} |
| 12 |
template <typename T> static T grault; // expected-error{{templates cannot be declared inside of a local class}} |
| 13 |
}; |
| 14 |
} |