Source:
x
1
class Test {
2
int a;
3
4
public:
5
Test(int x)
6
: a{x}
7
{
8
int other{};
9
auto l1 = [=] { return a + 2 + other; };
10
}
11
};
Insight:
1
1
Console:
class Test {
int a;
public:
Test(int x)
: a{x}
{
int other{};
auto l1 = [=] { return a + 2 + other; };
}
};