If an automatic is bound to a lambda function, does the life of the automatic get extended to the life of the lambda function?
Simplest case:
auto genfunc (int start)
{
int count=start;
return [&count] {
return count++;
};
}
Is this fine, or undefined behavior?
Aucun commentaire:
Enregistrer un commentaire