How is it possible that the following code is successfully compiled by GCC version [6..10] ?
int main(int argc, char *argv[])
{
auto const answer = 42;
auto lambda = [&answer] {};
auto *p = &(lambda.__answer);
return p != &answer; // return 0 (success) if they are the same
}
Is GCC leaking its internal representation of lambdas into the user's program?
Aucun commentaire:
Enregistrer un commentaire