関数にもできるよ、ほら

template <typename T, size_t SIZE>
inline size_t arraySize(const T (&x)[SIZE]) { return SIZE; }