samedi 14 septembre 2019

How to define a lambda function inside a struct in c++

is there any possibility to have a lambda expression inside a struct in c++ . logic goes as follows.

struct alpha {
  <lambda function> {
   /* to do */
}

};

int main()
{
int a =   //call the function inside the struct and compute.

}

Aucun commentaire:

Enregistrer un commentaire