“identifier”:显式实例化;无法显式强制和取消模板类成员的实例化
不能在防止标识符实例化的同时对其进行显式实例化。
下面的示例生成 C2929:
// C2929.cpp
// compile with: /c
template<typename T>
class A {
public:
A() {}
};
template A<int>::A();
extern template A<int>::A(); // C2929
“identifier”:显式实例化;无法显式强制和取消模板类成员的实例化
不能在防止标识符实例化的同时对其进行显式实例化。
下面的示例生成 C2929:
// C2929.cpp
// compile with: /c
template<typename T>
class A {
public:
A() {}
};
template A<int>::A();
extern template A<int>::A(); // C2929