http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59435
Bug ID: 59435 Summary: sizeof...(T) as default value for an argument does not work Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: thomas.sanchz at gmail dot com Hi everybody, I encountered something not supported in gcc from 4.7 to 4.9, but working in clang from 3.2 (tested on gcc goldbot). Here is the code: template <typename... E> struct T { T(unsigned int i = sizeof...(E)){} // does not compile static constexpr unsigned int U = sizeof...(E); T(unsigned int j, unsigned int i = U){} // compile }; template <typename... T> void test(int i = sizeof...(T)) // compile {} Invocation with "g++ -std=c++11 test.cpp" is enough to reproduce the bug. Please let me know if you need more information. Cheers,