https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65706
Bug ID: 65706 Summary: [c++14] Pack expansion with variable template incorrectly marked as invalid Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldionne.2 at gmail dot com The following code produces an error on GCC trunk: ------------------------------------------------------------------------------ void allow_expansion(...); template <int i> int vtemplate = i; template <int ...i> void f() { allow_expansion(vtemplate<i>...); } template void f<>(); template void f<1>(); template void f<1, 2>(); ------------------------------------------------------------------------------ Note that the three above statements trigger the same error. The exact output is › ~/code/gcc5/bin/g++ ~/code/hana/test/worksheet.cpp -std=c++1y [...]: In function ‘void f()’: [...]: error: expansion pattern ‘vtemplate<i>’ contains no argument packs allow_expansion(vtemplate<i>...); ^