You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks. Now output matches my expectations and a small test program also agrees that by value captures of references don't allow modifying the original object.
According to http://eel.is/c++draft/expr.prim.lambda#capture-10 and cppreference.org lambdas seems to capture references as copies of the decayed type.
But cppinsights does not agree given:
It generates:
Where i would expect based on the linked section that it would produce:
The text was updated successfully, but these errors were encountered: