re PR c++/65619 (friend declaration with template template parameter not recognized)
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 4 Apr 2019 15:49:30 +0000 (15:49 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 4 Apr 2019 15:49:30 +0000 (15:49 +0000)
2019-04-04  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/65619
* g++.dg/template/friend67.C: New.

From-SVN: r270146

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/friend67.C [new file with mode: 0644]

index 0363d1f0d89f82b738c2b73e86d20e179f141a64..7afa590a8ef4b023bfe7bf85e1113aafccd4acb5 100644 (file)
@@ -1,3 +1,8 @@
+2019-04-04  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/65619
+       * g++.dg/template/friend67.C: New.
+
 2019-04-04  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/61327
diff --git a/gcc/testsuite/g++.dg/template/friend67.C b/gcc/testsuite/g++.dg/template/friend67.C
new file mode 100644 (file)
index 0000000..2d516b9
--- /dev/null
@@ -0,0 +1,26 @@
+// PR c++/65619
+
+template <class>
+class foo
+{
+       int i;
+       
+       template <template <class> class T>
+       friend foo<T<int> > func();
+};
+
+template <template <class> class T>
+foo<T<int> > func()
+{
+       foo<T<int> > f;
+       f.i = 3;
+       return f;
+}
+
+template <class>
+struct test {};
+
+int main()
+{
+       func<test>();
+}