D calling convention

Lionello Lunesu lionello at lunesu.remove.com
Tue Oct 28 20:51:51 PDT 2008


> As a somewhat related, but separate issue, this would open the door to 
> real
> easy pointer-to-members. Given
>
> class C {
>  void foo(int i) { ... }
> }
>
> you could have
>
> typeof(C.foo) == void function(C, int)
>
> and
>
> auto memberfn = &C.foo;
> memberfn(new C, 42);
>
> would work too.

Is it possible to solve this problem and also solve the problem mentioned in 
the thread "implicitly convert function pointers to delegates"? Or are these 
two mutually exclusive?

L. 




More information about the Digitalmars-d mailing list