[Bug c++/45341] Compiler error matching template function with array reference parameter to anonimous struct array
--- Comment #3 from dev at sogetthis dot com 2010-08-19 15:27 --- I just found out that it does compile successfully with -std=c++0x flag. In C++03, unnamed type shall not be used as a template-argument for a template type-parameter (irrespective of it's linkage). In C++0x this restriction has been removed. See 14.3.1 Template type arguments -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45341
[Bug c++/45341] Compiler error matching template function with array reference parameter to anonimous struct array
--- Comment #2 from redi at gcc dot gnu dot org 2010-08-19 14:53 --- N.B this has nothing to do with arrays, the following fails for the same reason: template void func (T&); static struct { int i; } arr; void test() { func(arr); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45341
[Bug c++/45341] Compiler error matching template function with array reference parameter to anonimous struct array
--- Comment #1 from redi at gcc dot gnu dot org 2010-08-19 14:52 --- template parameters must have linkage, but an unnamed type has no linkage -- redi at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45341