Let's get the semantic around closure fixed.

Adam D. Ruppe destructionator at gmail.com
Fri May 28 02:47:41 UTC 2021


On Friday, 28 May 2021 at 02:41:27 UTC, Q. Schroll wrote:
> I was a little surprised that it needs the GC in the first 
> place. It's a template parameter after all.

It isn't the lambda that allocates per se, it is the `MapResult` 
struct that cannot necessarily be scope since it doesn't know if 
the range will be stored or returned or whatever.

Though perhaps if the returned map result inherited the lifetime 
of the captured variables it could work, just that gets 
complicated.


More information about the Digitalmars-d mailing list