编译器警告(等级 4)C4610
对象“class”永远不能实例化 - 需要用户定义的构造函数
该类没有用户定义的构造函数或默认构造函数。 不执行实例化。 下面的示例生成 C4610:
// C4610.cpp
// compile with: /W4
struct A {
int &j;
A& A::operator=( const A& );
}; // C4610
/* use this structure definition to resolve the warning
struct B {
int &k;
B(int i = 0) : k(i) {
}
B& B::operator=( const B& );
} b;
*/
int main() {
}