aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template12.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template12.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template12.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template12.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template12.C
new file mode 100644
index 0000000..635af97
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template12.C
@@ -0,0 +1,19 @@
+// PR c++/57568
+// { dg-require-effective-target c++11 }
+
+template < class T >
+struct remove_reference
+{ typedef int type; };
+template < class T >
+class X
+{
+ enum Q { };
+ bool f ()
+ {
+ Q a;
+ [&a]{
+ typename remove_reference < decltype (a) >::type t;
+ };
+ }
+};
+template class X< int >;