gcc/testsuite/g++.dg/template/spec8.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | // Specialization of member class template. |
| 4 | |
| 5 | template<class T1> struct A |
| 6 | { |
| 7 | template<class T2> struct B {}; |
| 8 | template<class T2> struct C {}; |
| 9 | }; |
| 10 | |
| 11 | template <> template <> struct A<int>::B<int>; |
| 12 | template <> template <class U> struct A<int>::B {}; |
| 13 | A<int>::B<int> ab; // { dg-error "incomplete" } |
| 14 | |
| 15 | A<int>::C<char> ac; |
| 16 | template <> template <class U> struct A<int>::C {}; // { dg-error "specialization" } |