编译器错误 C3886

“var”:literal 数据成员必须被初始化

literal 变量必须在声明时进行初始化。

下面的示例生成 C3886:

// C3886.cpp
// compile with: /clr /c
ref struct Y1 {
   literal int staticConst;   // C3886
   literal int staticConst2 = 0;   // OK
};