// gcc 4.5 // error: no matching function for call to 'func(<anonymous struct> [5])' // Adding name to struct fixes the error
template<class T, int N> void func (T(&)[N]); struct { int i; } arr[5]; void test() { func(arr); } -- Summary: Compiler error matching template function with array reference parameter to anonimous struct array Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dev at sogetthis dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45341