1

例如,我有一个转换模板

template<class T> struct Convert;
template<> struct Convert<T0> {typedef C0 Type;};
template<> struct Convert<T1> {typedef C1 Type;};
template<> struct Convert<T2> {typedef C2 Type;};

从转换,它转换

std::tuple<T0, T1, T2>; // version A

std::tuple<C0, C1, C2>; // version B

一般的任何方法,比如

template<class tupleA, template<class> class Convert>
{
    typedef .... tupleB;
}

这是一个答案。但它不能在 VC2012 和 VC++ Nov 2012 CTP 上编译。有什么办法让它在 VC++ 上工作?非常感谢!

4

0 回答 0