#include <cstdio> template < typename T, std::size_t N > char[N] sizer( T (&array)[N] ); <=== gcc error: expected unqualified-id before ‘[’ token
int main() { int t[15]; printf("%Zd\n", sizeof(sizer(t))); return 0; } -- Summary: compute size of static table in compile time rejected. Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pluto at agmk dot net GCC build triplet: x86-64-linux GCC host triplet: x86-64-linux GCC target triplet: x86-64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26615