https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63628
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-10-23 Summary|[c++1y] cannot use decltype |[c++1y] cannot use decltype |on captured variable in |on captured arg-pack |generic lambda | Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- This still fails on trunk, reduced from the original code in PR 61814 auto const pack = [](auto... t) { [&] { int a[] = { static_cast<decltype(t)>(t)... }; }; }; int main() { pack(1); } ll.cc: In instantiation of ‘<lambda(auto:1 ...)>::<lambda()> [with auto:1 = {int}]’: ll.cc:5:49: required from ‘struct<lambda(auto:1 ...)> [with auto:1 = {int}]::<lambda()>’ ll.cc:3:9: required from ‘<lambda(auto:1 ...)> [with auto:1 = {int}]’ ll.cc:10:15: required from here ll.cc:5:55: error: cannot convert ‘decltype (t)’ to ‘int’ in initialization int a[] = { static_cast<decltype(t)>(t)... }; ^ ll.cc:5:55: error: storage size of ‘a’ isn’t known