PR c++/82882
PR c++/83978
* g++.dg/cpp0x/pr82882.C: New test.
* g++.dg/cpp0x/pr83978.C: New test.
From-SVN: r256985
2018-01-23 Jakub Jelinek <jakub@redhat.com>
+ PR c++/82882
+ PR c++/83978
+ * g++.dg/cpp0x/pr82882.C: New test.
+ * g++.dg/cpp0x/pr83978.C: New test.
+
PR c++/83958
* g++.dg/cpp1z/decomp35.C: New test.
--- /dev/null
+// PR c++/82882
+// { dg-do compile { target c++11 } }
+
+template <typename>
+void
+foo ()
+{
+ auto v = [] { enum { E, F }; };
+}
+
+void
+bar ()
+{
+ foo<int> ();
+}
--- /dev/null
+// PR c++/83978
+// { dg-do compile { target c++11 } }
+
+template <int N>
+struct A { A () { auto a = [] { enum E { F }; }; } };
+A<0> *p = new A<0> ();