Patchwork [C++,testcase] PR 53403

login
register
mail settings
Submitter Paolo Carlini
Date Oct. 4, 2012, 11:21 p.m.
Message ID <506E19E4.1090103@oracle.com>
Download mbox | patch
Permalink /patch/189366/
State New
Headers show

Comments

Paolo Carlini - Oct. 4, 2012, 11:21 p.m.
Hi,

I'm adding the testcase and closing the PR. Tested x86_64-linux.

Thanks,
Paolo.

/////////////////////////////
2012-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53403
	* g++.dg/template/friend53.C

Patch

Index: g++.dg/template/friend53.C
===================================================================
--- g++.dg/template/friend53.C	(revision 0)
+++ g++.dg/template/friend53.C	(working copy)
@@ -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>();
+}