编译器错误 C2574

“function”:不能声明为静态

注解

不能声明构造函数或析构函数static。

示例:

以下示例生成 C2574:

// C2574.cpp
// compile with: /c
struct S
{
    static S() {}   // C2574

    // Try the following line instead:
    // S() {}
};