Compiler Error C3652
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C3652.
override' : a function that explicitly overrides must be virtual
A function that does an explicit override must be virtual. For more information, see Explicit Overrides.
The following sample generates 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 {}
};
Show: