Consider the following functions:
void func1(int unsized_array[]){}
void func2(int sized_array[10]){}
void func3(int *pointer){}
According to the result of:
std::cout << std::is_same<decltype(func1), decltype(func2)>::value << std::endl;
std::cout << std::is_same<decltype(func2), decltype(func3)>::value << std::endl;
std::cout << std::is_same<decltype(func3), decltype(func1)>::value << std::endl;
Types of these 3 functions is the same. Also inside the functionfunc2, sizeofoperator does not provide the size of array elements all combined.
So what is the purpose of sized array as function argument (like func2)?