What is the difference between functions, which have reference to an array:
// reference to array
void f_(char (&t)[5]) {
auto t2 = t;
}
and simply array:
// just array
void f__(char t[5]) {
auto t2 = t;
}
as a parameters?
The calling code is:
char cArray[] = "TEST";
f_(cArray);
f__(cArray);
char (&rcArr)[5] = cArray;
f_(rcArr);
f__(rcArr);
In both cases t2 is char*, but in first function my VS2019 is showing that t inside function has type char(&t)[] and t inside second function has type char*.
So after all, is there any practical difference between those functions?