The following code does not compile with GCC trunk: template <typename ...T> void expand(T const& ...); template <typename ...T> void f(T ...t) { expand([t]{ }...); } The error is [snip]: In function 'void f(T ...)': [snip]: error: parameter packs not expanded with '...': expand([t]{ }...); ^ [snip]: note: 't' [snip]: error: parameter packs not expanded with '...': expand([t]{ }...); ^ Live example: http://melpon.org/wandbox/permlink/uKHsTOctM4EbNTpi
Almost certainly a dup of PR 64488 and PR 47226
Interestingly, it's still an issue in trunk.
Author: paolo Date: Sat Mar 3 18:09:27 2018 New Revision: 258218 URL: https://gcc.gnu.org/viewcvs?rev=258218&root=gcc&view=rev Log: 2018-03-03 Paolo Carlini <paolo.carlini@oracle.com> PR c++/67370 * g++.dg/cpp0x/lambda/lambda-67370.C: New. Added: trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-67370.C Modified: trunk/gcc/testsuite/ChangeLog
Fixed in trunk.