#include <boost/preprocessor/list/size.hpp> #define LIST (0, (1, (2, (3, BOOST_PP_NIL)))) BOOST_PP_LIST_SIZE(LIST) // 4 に展開される