struct S { int x = 4; void f(int i); }; void S::f(int i) { [=, *this]{}; // OK: captures this by value. See below. }
Why is the lambda [=, *this]{}; valid?
Aucun commentaire:
Enregistrer un commentaire