Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambda capture in a member function #379

Closed
tiberiu-maran opened this issue Feb 23, 2021 · 1 comment
Closed

Lambda capture in a member function #379

tiberiu-maran opened this issue Feb 23, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@tiberiu-maran
Copy link

Hi, I was playing around with this very neat tool, and I stumbled upon a scenario where it doesn't seem to produce the right result.

https://cppinsights.io/s/bb1d1c12

Basically the code should capture both the local variable a and a pointer to this, but in the generated code, even though a is declared it is not initialized by the constructor of the lambda structure.

@andreasfertig
Copy link
Owner

Hello @tiberiu-maran,

thanks for reporting this issue! Seems that this was sleeping for a long time. A fix is on its way.

Andreas

@andreasfertig andreasfertig added the bug Something isn't working label Feb 23, 2021
andreasfertig added a commit that referenced this issue Feb 23, 2021
Fixed #379: Process lambda's captures if this is captured.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants