Compiler Error C3869

 

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

gcnew constraint is missing empty parameter list '()'

The gcnew special constraint was specified without the empty parameter list. See Constraints on Generic Type Parameters (C++/CLI) for more information.

The following sample generates C3869.

// C3869.cpp  
// compile with: /c /clr  
using namespace System;  
generic <typename T>  
where T : gcnew   // C3869  
// try the following line instead  
// where T : gcnew()  
ref class List {};  

Show: