http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11582
--- Comment #10 from Gabriel Dos Reis <gdr at gcc dot gnu.org> 2013-04-23
03:45:56 UTC ---
(In reply to comment #9)
> (In reply to comment #8)
> > Printing int[] or int[size_t] would be confusing too.
>
> More confusing than int[(((sizetype)<anonymous>) + 1)] ?
>
> What about?
>
> t7881.cc: In function ‘void g()’:
> t7881.cc:6:10: error: no matching function for call to ‘f(int
> [{variable-length}])’
> t7881.cc:6:10: note: candidate is:
> t7881.cc:2:23: note: template<int N> void f(int (&)[N])
> t7881.cc:2:23: note: template argument deduction/substitution failed:
> t7881.cc:6:10: note: variable-sized array type is not a valid template
> argument
Remember that an "array type" as a function parameter is equivalent to a
pointer type.