[Bug c++/84726] [8 regression] Unnecessary lambda capture of constant variables
P at draigBrady dot com
gcc-bugzilla@gcc.gnu.org
Fri Sep 7 03:28:00 GMT 2018
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.
More information about the Gcc-bugs
mailing list