At first, I wrote something like this
template<typename T, size_t size>
inline size_t const sizeof_array(T const [size]){return size;}
but if failed, then I find a solution form the other place, like this.
template<typename T, size_t size>
inline size_t const sizeof_array(T const (&)[size]){return size;}
what is the meaning of (&)? Why version one fail?
Thanks a lot