c++: robustify testcase [PR109752]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / lambda-generic-100362.C
blob283c2c9477ef0fb9743d0540346c685b93ae7a2c
1 // PR c++/100362
2 // { dg-do compile { target c++14 } }
4 template <class>
5 struct Qux {
6   struct A { } a_;
7   A f();
9   void AsyncOp() {
10     [](auto) {
11       struct local : decltype(a_) {};
12       local ptr;
13     }(0);
15     [](auto) {
16       struct local : decltype(f()) {};
17       local ptr;
18     }(0);
19   }
22 void corge() {
23   Qux<int> qux;
24   qux.AsyncOp();