typeof(&method) fails unless method is static. Says & requires this.

But for typeof, it shouldn't matter and should pass.

So how to get a function pointer to a non static member function(of an interface)?

I've tried creating the type like

T t;
typeof(&t.method) fptr;

but same issue. It may be because T is an interface, but again, it shouldn't matter. I just want the function pointer declaration.

e.g., `void function();` for `void foo();`


This is to avoid building the declaration myself which may be error prone.

Reply via email to