Declare reference to variable ?
Maxim Fomin
maxim at maxim-fomin.ru
Mon Jul 29 19:13:05 PDT 2013
On Monday, 29 July 2013 at 21:37:30 UTC, bearophile wrote:
> Temtaime:
>
>> Why i cannot declare reference in D ?
>
> I don't know the reasons. But maybe you can create a little
> struct with just a pointer inside and an alias this to a member
> function that returns a ref.
>
> Bye,
> bearophile
It doesn't work because alias this does not capture context
pointer like delegate.
More information about the Digitalmars-d-learn
mailing list