diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/friend7.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/friend7.C | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/friend7.C b/gcc/testsuite/g++.old-deja/g++.pt/friend7.C new file mode 100644 index 000000000..de834bc4e --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/friend7.C @@ -0,0 +1,26 @@ +// { dg-do run } +template <class T> +void f(T); + +template <class U> +class C +{ + template <class T> + friend void f(T); + + int i; +}; + + +template <class T> +void f(T) +{ + C<T> c; + c.i = 3; +} + + +int main() +{ + f(7); +} |