[cpp] 嵌套模板的使用问题

苏亚 su1981ya at 163.com
Wed Dec 6 09:50:19 CST 2006


模板中使用嵌套:
template<typename T1, typename T2, typename T3, typename T4>
class InferenceData
{
typedef vector<pair<pair<pair<T1, T2>, T3>, T4> > VecPair;
typedef vector<pair<pair<pair<T1, T2>, T3>, T4> >::iterator itePair;
}

编译出错:
type `std::vector<std::pair<std::pair<std::pair<_T1, _T2>, T3>, T4>,
std::allocator<std::pair<std::pair<std::pair<_T1, _T2>, T3>, T4> > >' is
not derived from type `InferenceData<T1, T2, T3, T4>'

不知什么问题?



More information about the Cpp mailing list