gcc/testsuite/g++.old-deja/g++.pt/friend45.C
raw| 1 | // { dg-do assemble } |
| 2 | // |
| 3 | // Copyright (C) 2000 Free Software Foundation, Inc. |
| 4 | // Contributed by Nathan Sidwell 14 Aug 2000 <[email protected]> |
| 5 | |
| 6 | // bug 42. We ICE'd on instantiating a template with a bogus templated friend. |
| 7 | |
| 8 | template<typename T> struct X |
| 9 | { |
| 10 | template<typename D> friend X<D>; // { dg-error "" } friend must use aggr tag |
| 11 | }; |
| 12 | |
| 13 | X<int> g; |