>>406-411
みなさんありがとうございます。

template<class T, int N> int len(T (&)[N]){return N;}
と
#include <cstddef>
template<typename T, std::size_t N>
char (&lengthof_helper_char_array(T (&a)[N]))[N];
#define lengthof(a) (sizeof(lengthof_helper_char_array(a)))
ですと、どちらが望ましいのでしょうか?