I currently have something like this
void foo::setup()
{
//this->setSubTitleText("Summary");
button("ok")->onPress = [=](Mtype*)
{
this->bar(this); //Why is the this pointer being recognized here?
};
}
Does the = in a capture clause of a lambda give access to the this pointer. In my case it is ? I was under the impression to use the this pointer I would need to explicitly capture this like
button("ok")->onPress = [=,this](Mtype*)
{
this->bar(this); //Why is the this pointer being recognized here?
};
Any suggestions ?
Aucun commentaire:
Enregistrer un commentaire