Compiler Error C3666


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at Compiler Error C3666.

constructor' : override specifier 'keyword' not allowed on a constructor

An override specifier was used on a constructor, and that is not allowed. For more information, see Override Specifiers.

The following sample generates C3666.

// C3666.cpp  
// compile with: /clr /c  
ref struct R {  
   R() new {}   // C3666  
   R(int i) {}   // OK