Wow, this is complicated. I don't know either, but if you keep reading the comments on this page:
substantially
int arr [17]; int arrSize = GetArrLength (arr);
which creates this function:
int GetArrLength (int (&) [17]) {return 17;}
So, and this should mean a link, as it always happens, so it takes a reference to the type of array and size (the second element in the template), and then the size of the incoming array.
I think that I will stick to the old
sizeof(x)/sizeof(x[0])
Dougn source share