【发布时间】:2014-05-14 04:09:05
【问题描述】:
我正在编写一个简单的类来管理一些代码弯路。
班级:
class CDetourManager {
public:
CDetourManager() {}
~CDetourManager() {}
template<convention_type tp, typename retn, typename ...args>
VOID AddDetour( Detour<tp, retn, args...>* d ) {
m_Detours.push_back( d );
}
private:
template<convention_type tp, typename retn, typename ...args>
std::vector<Detour<tp, retn, args...>* > m_Detours;
};
但我得到一个错误:Error 1 error C3857: 'CDetourManager::m_Detours': multiple template parameter lists are not allowed
有谁知道我可以做些什么来摆脱这个错误?这是我第一次使用模板,所以我有点迷失在这里:(
【问题讨论】:
-
那不行,
m_Detours没有明确的类型。