C++/CLI protected delegate

G

Guest

The following code

public ref class X
{
protected:
delegate void D();
void F(D^ a) { }
};

gives warning C4677: 'F': signature of non-private member contains assembly
private type 'X:D'

In another assembly the following code (C#) works fine:
public class Y : X {
public void Callback() { }
Y() { F(Callback); }
}
 
B

Ben Voigt [C++ MVP]

wpcmame said:
The following code

public ref class X
{
protected:
delegate void D();
void F(D^ a) { }
};

gives warning C4677: 'F': signature of non-private member contains
assembly
private type 'X:D'

Looks like a bug, I suggest you file it on Connect.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top