【发布时间】:2012-07-19 23:23:16
【问题描述】:
我想要这样的东西:
class MyClass
{
public:
static const int n = some_traits_class<SomeClass>::value;
template <BOOST_PP_ENUM_PARAMS(MyClass::n, typename P)>
void operator()( BOOST_PP_ENUM_BINARY_PARAMS(MyClass::n, const P, & p) )
{
....
}
}
编译器似乎不喜欢这样 - 是否有某种修复方法可以到达我想要的位置?
【问题讨论】:
-
预处理器不知道变量。
标签: c++ boost boost-preprocessor