编译器错误 C3652
“override”:显式重写的函数必须为虚函数
进行显式重写的函数必须是虚函数。 有关详细信息,请参阅显式重写。
以下示例生成 C3652:
// C3652.cpp
// compile with: /clr /c
public interface class I {
void f();
};
public ref struct R : I {
void f() = I::f {} // C3652
// try the following line instead
// virtual void f() = I::f {}
};