#include <boost/preprocessor/array/size.hpp> #define ARRAY (3, (x, y, z)) BOOST_PP_ARRAY_SIZE(ARRAY) // expands to 3