Compiler Error C3653
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 C3653.
function' : cannot be used as a named override: a function being overridden not found; did you forget to name the function explicitly, using a :: operator?
An explicit override specified a function that was not found in any interface. For more information, see Explicit Overrides.
The following sample generates C3653:
// C3653.cpp
// compile with: /clr
public interface struct I {
void h();
};
public ref struct X : public I {
virtual void f() new sealed = J {}; // C3653 no J in scope
virtual void g() {} // OK
virtual void h() new sealed = I::h {}; // OK
};
Show: