https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77523
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-03-17 CC| |msebor at gcc dot gnu.org, | |nathan at acm dot org Ever confirmed|0 |1 Known to fail| |5.4.1, 6.3.0, 7.0 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- Confirmed. EDG eccp 4.13 also accepts it. In addition, with today's top of trunk the instantiation context is missing. This is all I see on output: $ gcc -Wall -Wextra -Wpedantic -Wrestrict -std=c++1y t.C t.C: In function ‘void f(T)’: t.C:3:18: error: cannot capture ‘f<>’ by reference auto g = [&a = f <>] () {}; ^~~~ $ Bisection points to r244056 as the change that caused the loss of the context. CC'ing the author.