aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto2.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto2.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto2.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto2.C
new file mode 100644
index 0000000..05fadf5
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto2.C
@@ -0,0 +1,16 @@
+// PR c++/56901
+// { dg-require-effective-target c++11 }
+
+template <typename>
+void foo_impl()
+{
+ int data;
+ auto L = [&](){ return data; };
+ [&](){ L(); }();
+ [&L](){ L(); }();
+}
+
+void foo()
+{
+ foo_impl<int>();
+}