When I tried to compare two types of function arrays, I encountered this strange behavior.
I have test code:
using ArrayOfFunctionsT = int (* [])(int);
ArrayOfFunctionsT functions = {};
std::cout << typeid(decltype(functions)).name() << " vs " << typeid(int (*[0])(int)).name() << "\n";
std::cout << std::is_same<decltype(functions), int (*[0])(int)>::value << "\n";
The result of the execution is:
A0_PFiiE vs A0_PFiiE
0
Currently I'm using gcc 10.2.1. What is the reason for this behavior?