3 // { dg-options "-std=c++2a -Wno-deprecated" }
8 auto a1 = [=] { x = n; }; // { dg-bogus "implicit capture" }
9 auto a2 = [=, this] { x = n; };
10 auto a3 = [=, *this]() mutable { x = n; };
11 auto a4 = [&] { x = n; };
12 auto a5 = [&, this] { x = n; };
13 auto a6 = [&, *this]() mutable { x = n; };
15 auto a7 = [=] { // { dg-bogus "implicit capture" }
16 auto a = [=] { // { dg-bogus "implicit capture" }
17 auto a2 = [=] { x = n; }; // { dg-bogus "implicit capture" }
23 auto a2 = [=, this] { x = n; };
27 auto a9 = [=, *this]() mutable {
28 auto a = [=, *this]() mutable {
29 auto a2 = [=, *this]() mutable { x = n; };
35 auto a2 = [&] { x = n; };
39 auto a11 = [&, this] {
41 auto a2 = [&, this] { x = n; };
45 auto a12 = [&, *this]() mutable {
46 auto a = [&, *this]() mutable {
47 auto a2 = [&, *this]() mutable { x = n; };