I have a lambda function inside a static class method, like so:
void
MyClass::foo() {
auto my_lambda = [](int arg) {
// do stuff
}
}
Where foo is a static method of MyClass. Now, inside my_lambda I want to reference another static method bar of MyClass. How can I do this? I've seen this question but it seems like this only works for non static methods, since static methods cannot reference this?
Aucun commentaire:
Enregistrer un commentaire