gcc/testsuite/g++.dg/parse/template29.C
raw| 1 | // PR c++/24314 |
| 2 | |
| 3 | // The base template. |
| 4 | template <class T> |
| 5 | struct A |
| 6 | { |
| 7 | int select() { return 0; } |
| 8 | }; |
| 9 | |
| 10 | //Extra "template<>" |
| 11 | template <> |
| 12 | template <> |
| 13 | template <> |
| 14 | template <> |
| 15 | template <> |
| 16 | template <> |
| 17 | template <> |
| 18 | template <> |
| 19 | template <> |
| 20 | template <> |
| 21 | template <> |
| 22 | template <class T> |
| 23 | struct A<T*> // { dg-error "too many template-parameter-lists" } |
| 24 | { |
| 25 | int select() { return 1; } |
| 26 | }; |
| 27 | |
| 28 | int main() |
| 29 | { |
| 30 | return A<int*>().select(); |
| 31 | } |