[Bug c++/82611] Incorrect warning for redundant capture in lambda

2017-10-21 Thread jetanner at usc dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82611 --- Comment #2 from James Tanner --- In that case it seems as though the standard has overlooked this scenario, as there is no way to achieve this without incurring a warning message.

[Bug c++/82611] New: Incorrect warning for redundant capture in lambda

2017-10-18 Thread jetanner at usc dot edu
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jetanner at usc dot edu Target Milestone: --- test.cpp: int main() { int i; auto a = [=, i](){}; } Warning produced: test.cpp: In function ‘int main()’: test.cpp:4:15: warning: explicit by-copy capture of ‘i