gcc/testsuite/g++.old-deja/g++.pt/derived3.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | // by Paul Burchard <[email protected]>, Level Set Systems, Inc. |
| 4 | // Copyright (C) 1999, 2002 Free Software Foundation |
| 5 | |
| 6 | template<class T> |
| 7 | class X { |
| 8 | class Y : public T // { dg-error "base type .* fails to be" } |
| 9 | { |
| 10 | }; |
| 11 | Y y; // { dg-message "required" } |
| 12 | }; |
| 13 | int main() { |
| 14 | X<int> x; // { dg-message "required" } |
| 15 | } |
| 16 |