gcc/testsuite/g++.old-deja/g++.pt/friend38.C
raw| 1 | // { dg-options "-std=c++98 -pedantic-errors" } |
| 2 | // { dg-do assemble } |
| 3 | |
| 4 | // Overly simplified from testcase by "B. K. Oxley" <[email protected]> |
| 5 | |
| 6 | template<class P, class Q> struct foo { |
| 7 | typedef P parent_type; |
| 8 | friend parent_type; // { dg-error "" } template parameters cannot be friends |
| 9 | friend Q; // { dg-error "" } template parameters cannot be friends |
| 10 | }; |