Compiler Error C3253

 

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 C3253.

function' : error with explicit override

An explicit override was specified incorrectly. For example, you cannot specify an implementation for an override that you also specify as pure. For more information, see Explicit Overrides.

The following sample generates C3253:

// C3253.cpp  
// compile with: /clr  
public interface struct I {  
   void a();  
   void b();  
   void c();  
};  
  
public ref struct R : I {  
   virtual void a() = 0, I::a {}   // C3253  
   virtual void b() = I::a {}   // OK  
   virtual void c() = 0;   // OK  
};  

Show: