Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/pr61636-1.C

raw
1 // PR c++/61636
2 // PR c++/79264
3 // { dg-do compile { target c++14 } }
4
5 // ICE because we figure this capture too late.
6
7 struct Base
8 {
9 void Bar (int);
10 };
11
12 struct A : Base {
13 void b ();
14 void Foo (int);
15 using Base::Bar;
16 template <typename T> void Baz (T);
17 };
18
19 void A::b() {
20
21 auto lam = [&](auto asdf) { Foo (asdf); };
22
23 lam (0);
24
25 auto lam1 = [&](auto asdf) { Bar (asdf); };
26
27 lam1 (0);
28
29 auto lam2 = [&](auto asdf) { Baz (asdf); };
30
31 lam2 (0);
32
33 auto lam3 = [&](auto asdf) { Baz<int> (asdf); };
34
35 lam3 (0);
36 }