gcc/testsuite/g++.old-deja/g++.pt/error3.C
raw| 1 | // { dg-do assemble } |
| 2 | |
| 3 | // Copyright (C) 2000 Free Software Foundation, Inc. |
| 4 | // Contributed by Nathan Sidwell 10 Jan 2001 <[email protected]> |
| 5 | |
| 6 | // Bug 1606. We sorry'd issuing an error. |
| 7 | |
| 8 | struct A {}; |
| 9 | template <class T = A> class Tpl {}; |
| 10 | |
| 11 | struct B { |
| 12 | Tpl<int> s; |
| 13 | }; |
| 14 | |
| 15 | void foo (B *ptr) |
| 16 | { |
| 17 | ptr->Tpl.t (); // { dg-error "" } template as expression |
| 18 | } |