Pointers to non-static member functions!

Jason House jason.james.house at gmail.com
Wed Jun 8 06:32:52 PDT 2011


Daniel Murphy Wrote:

> Currently, this compiles:
> 
> class A
> {
>     void func() {}
> }
> 
> void main()
> {
>   auto p = &A.func;
> }
> 
> In this case, typeof(p) is void function().

Shouldn't it be void function(A)? As long as the ABI supports it, that would make the most sense to me... As I understand it, the this pointer is just a hidden parameter.



More information about the Digitalmars-d mailing list