【发布时间】:2011-09-26 05:02:44
【问题描述】:
我有一些类似的课程:
template<int DIMENSION, typename T> Vector { ... }
现在,我想专门化类型名并使用 typedef 提供一个新类型。因此,我在 StackOverflow 上找到了答案 C++ typedef for partial templates
我这样做了:
template < int DIMENSION> using VectorDouble= Vector<DIMENSION, double>;
这无法编译(错误 C2988:无法识别的模板声明/定义)。这是因为我的编译器 (Visual Studio 2008) 不允许,还是我遗漏了什么?
谢谢。
【问题讨论】: