I know that using type alias and typedef make the code so readable, less error-prone and easy modify. However in this example I want to know this complicated type:
#include <iostream>
#include <typeinfo>
char ( * (* x() )[] )();
int main(){
std::cout << typeid(x).name() << std::endl;
}
As the rule of thumb says that I read it from inside through outside but I find it too confusing.
Can someone help me how to read it?
The output of GCC:
FPA_PFcvEvE
And see https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangle.array-type , like:
Example: