In my opinion there is some inconsistence in the function overload resolution when a function parameter has a referenced array type.
Let assume that we have two functions
void f( const ( &a )[] );
and
void f( const ( &a )[2] );
If to write
f( { 1, 2 } );
then the second function will be selected.
However if to write
int a[2];
and then
f( a );
then the compiler will issue an error relative to an ambiguity.
It would be more natural if in this case also the second function would be selected.
With best regards
(Vlad from Moscow)
--