Converting function pointers to delegates

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Apr 15 06:13:17 PDT 2014


On 4/15/14, Artur Skawina <art.08.09 at gmail.com> wrote:
> He obviously meant that you can't get a pointer to the object, that the
> reference points to, just by casting and w/o address-of.

Ah right. I don't do this often so I forgot. The proper code would be:

int* f(ref int r) { return &r; }


More information about the Digitalmars-d-learn mailing list