1 // { dg-do compile { target c++14 } }
2 // PR 79253 ICE instantiating lambda body.
3
4 template <typename> struct A;
5 template <typename = A<int>> class B {};
foo(U,V)6 template <class T, class U, class V> void foo (U, V) { T (0, 0); }
7 struct C {};
8 template <template <bool, bool, bool> class F, class>
9 void
bar()10 bar ()
11 {
12 F<0, 0, 0>::baz;
13 }
14 struct G { int l; };
15 template <int, int, int> struct E : C
16 {
EE17 E (int, int) : e (0)
18 {
19 auto &m = this->m ();
20 auto c = [&] { m.l; };
21 }
22 G &m ();
23 int e;
24 };
25 struct D
26 {
27 void
bazD28 baz () { bar<F, B<>>; }
29 template <bool, bool, bool> struct F
30 {
bazD::F31 static B<> baz () { foo<E<0, 0, 0>> (0, 0); return B<>(); }
32 };
33 };
34