我知道我们可以将元素打印到一个知道总计数(伪代码)的定义中:
// For the sake of simplicity, I assume the Sequence passed is a boost::mpl::vector
#define seq_to_array_str \
< typename boost::mpl::at<Sequence, 0>::type \
, typename boost::mpl::at<Sequence, 1>::type \
, typename boost::mpl::at<Sequence, 2>::type \
...
, typename boost::mpl::at<Sequence, N>::type
>
但我想知道如何为 boost::mpl 序列的所有元素自动执行此类操作?(我想知道 Vector 但我认为任何 mpl 序列类型都可以有一个通用答案)