http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51507
Bug #: 51507 Summary: [C++0x] Function parameter pack doesn't use in template-argument-list Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: digital-ghost_tsund...@hotmail.co.jp Following code cannot compile with gcc: template<typename ...> struct foo { typedef void type; }; template<typename ...Ts> auto g(Ts ...ts)-> typename foo<decltype(ts)...>::type {} int main() { g(42); } Error: test1.cpp: In function 'int main()': test1.cpp:8:9: error: expansion pattern 'int' contains no argument packs test1.cpp:8:9: error: no matching function for call to 'g(int)' test1.cpp:8:9: note: candidate is: test1.cpp:4:6: note: template<class ... Ts> typename foo<decltype (ts)...>::type g(Ts ...) I think decltype(fs()) is a valid template-argument pattern for foo.