9 virtual ~Baz() = default;
11 virtual int baz_virt() = 0;
13 int base_base_var
= 12;
16 struct Bar
: public Baz
{
17 virtual ~Bar() = default;
19 virtual int baz_virt() override
{
27 struct Foo
: public Bar
{
32 virtual ~Foo() = default;
34 virtual int baz_virt() override
{
42 class_ptr
= &local_var
;
43 auto lambda
= [&shadowed
, this, &local_var
,
44 local_var_copy
= local_var
]() mutable {
45 int lambda_local_var
= 5;
50 std::puts("break here");
52 auto nested_lambda
= [this, &lambda_local_var
, local_var
] {
53 std::puts("break here");
59 std::puts("break here");
61 struct LocalLambdaClass
{
62 int lambda_class_local
= -12345;
66 auto lambda
= [this] {
67 std::puts("break here");
68 lambda_class_local
= -2;
69 outer_ptr
->class_var
*= 2;
83 void non_capturing_method() {
88 std::puts("break here");
89 return local
+ local2
;
97 f
.non_capturing_method();