https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84726
Pádraig Brady <P at draigBrady dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |P at draigBrady dot com --- Comment #4 from Pádraig Brady <P at draigBrady dot com> --- Note bug 87185, mentions this snippet which is currently not handled by this change: void f() { const int i=0; [&]() noexcept {i;}; } Specifically the "noexcept" causes non traversal of the statements, and thus "i" remains captured in this example.