Are there any builtin equivalents to _countof provided by other compilers, in particular GCC and Clang? Are there any non-macro forms?
Update: C++ 17 support std::size() (defined in header )
You can use boost::size() instead:
#include int my_array[10]; boost::size(my_array);