Compiler Error C3755

 

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

delegate': a delegate may not be defined

A delegate (C++ Component Extensions) can be declared but not defined.

The following sample generates C3755.

// C3755.cpp  
// compile with: /clr /c  
delegate void MyDel() {};   // C3755  

C3755 can also occur if you attempt to create a delegate template. The following sample generates C3755.

// C3755_b.cpp  
// compile with: /clr /c  
ref struct R {  
   template<class T>  
   delegate void D(int) {}   // C3755  
};  

Show: