gcc/testsuite/g++.dg/template/init-list.C
raw| 1 | // Contributed by Gabriel Dos Reis <[email protected]> |
| 2 | // { dg-do compile } |
| 3 | |
| 4 | template<typename T> |
| 5 | struct Base { |
| 6 | Base(int) { } |
| 7 | }; |
| 8 | |
| 9 | template<typename T> |
| 10 | struct Derived : Base<T> { |
| 11 | Derived(); |
| 12 | }; |
| 13 | |
| 14 | template<typename T> |
| 15 | Derived<T>::Derived() : Base(4) { } // { dg-error "have any field" } |
| 16 | |
| 17 |