Patchwork [C++,testcase] PR 53741

login
register
mail settings
Submitter Paolo Carlini
Date Oct. 10, 2012, 10:16 a.m.
Message ID <50754B16.8060205@oracle.com>
Download mbox | patch
Permalink /patch/190605/
State New
Headers show

Comments

Paolo Carlini - Oct. 10, 2012, 10:16 a.m.
Hi,

adding the testcase and closing the PR as fixed.

Thanks,
Paolo.

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

	PR c++/53741
	* g++.dg/cpp0x/lambda/lambda-ice9.C: New.

Patch

Index: g++.dg/cpp0x/lambda/lambda-ice9.C
===================================================================
--- g++.dg/cpp0x/lambda/lambda-ice9.C	(revision 0)
+++ g++.dg/cpp0x/lambda/lambda-ice9.C	(working copy)
@@ -0,0 +1,18 @@ 
+// PR c++/53741
+// { dg-do compile { target c++11 } }
+
+struct X
+{
+  template <class T> static void bar() {}
+
+  template <class T> void foo(T p) 
+  {
+    [&] { bar<T>(); };
+  }
+};
+
+int main()
+{
+  X x;
+  x.foo(3);
+}