diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/template/friend53.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/template/friend53.C | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/template/friend53.C b/gcc-4.9/gcc/testsuite/g++.dg/template/friend53.C new file mode 100644 index 000000000..6cbbb2b09 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/template/friend53.C @@ -0,0 +1,23 @@ +// PR c++/53403 + +template <typename T> +class Foo +{ + typedef void type; + template <typename U> friend void f(); +public: + Foo() {} +}; + +template class Foo<void>; + +template <typename T> +void f() +{ + typedef Foo<void>::type type; +} + +int main() +{ + f<void>(); +} |