summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C
new file mode 100644
index 000000000..12ffde724
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C
@@ -0,0 +1,20 @@
+// PR c++/47049
+// { dg-options -std=c++0x }
+
+enum { E = 0, F = 1 };
+template <int N, int M = ((N == 1) ? F : E)> class S {};
+template <int N>
+struct T
+{
+ static void
+ foo (S<N> *p)
+ {
+ S<N> u;
+ [&u] ()->bool {} ();
+ }
+};
+
+int main()
+{
+ T<0>().foo(0);
+}