in c++, a compile-time equivalent to sizeof would be:
template<typename T, size_t N> size_t sz(T(&)[N]) { return N; }