我想获取一个类模板列表T 1 , T 2 , ... T N并列出一个 MPL 类列表,其中每个模板都使用相同的参数进行实例化。
boost::mpl::list
不能与模板模板参数列表一起使用,只能与常规类型参数一起使用。
所以以下不起作用:
class A { ... };
template<template <class> class T>
struct ApplyParameterA
{
typedef T<A> Type;
}
typedef boost::mpl::transform<
boost::mpl::list<
T1, T2, T3, T4, ...
>,
ApplyParameterA<boost::mpl::_1>::Type
> TypeList;
我怎样才能让它工作?