http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48737
Summary: [C++0x][SFINAE] Hard errors with array list-construction with too many elements Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: daniel.krueg...@googlemail.com CC: ja...@redhat.com gcc 4.7.0 20110422 (experimental) in C++0x mode rejects the following code: //------------------------- template<class T> T&& create(); template<class T, class... Args> decltype(T{create<Args>()...}, char()) f(int); template<class, class...> char (&f(...))[2]; static_assert(sizeof(f<int[1], int, int>(0)) != 1, "Error"); //------------------------- "error: too many initializers for ‘int [1]’" The code should be accepted.