Closure capture loop variables
Vladimir Panteleev via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 29 22:23:53 PDT 2015
On Thursday, 30 April 2015 at 03:58:44 UTC, Freddy wrote:
> On Thursday, 30 April 2015 at 01:19:45 UTC, Vladimir Panteleev
> wrote:
>> Because "copy" is still modified every time "i" is.
> But shouldn't copy be redeclared every loop iteration (or the
> compiler could pretend to redeclare it).
No, it will have the same address every time.
More information about the Digitalmars-d
mailing list