[Bug c++/82611] Incorrect warning for redundant capture in lambda
ensadc at mailnesia dot com
gcc-bugzilla@gcc.gnu.org
Sat Oct 21 07:19:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82611
ensadc at mailnesia dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ensadc at mailnesia dot com
--- Comment #1 from ensadc at mailnesia dot com ---
The diagnostic is required by the standard.
[expr.prim.lambda.capture]/2
(http://wg21.link/expr.prim.lambda.capture#2.sentence-2):
If a lambda-capture includes a capture-default that is =, each simple-capture
of that lambda-capture shall be of the form “& identifier”, “this”, or “*
this”.
More information about the Gcc-bugs
mailing list