diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CXX/temp/temp.decls/temp.friend/p1.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CXX/temp/temp.decls/temp.friend/p1.cpp b/test/CXX/temp/temp.decls/temp.friend/p1.cpp index 39818028bb..0e41e5f832 100644 --- a/test/CXX/temp/temp.decls/temp.friend/p1.cpp +++ b/test/CXX/temp/temp.decls/temp.friend/p1.cpp @@ -178,3 +178,16 @@ namespace test7 { }; template class D<int>; } + +namespace test8 { + template <class N> class A { + static int x; + template <class T> friend void foo(); + }; + template class A<int>; + + template <class T> void foo() { + A<int>::x = 0; + } + template void foo<int>(); +} |