_aaApply2

IchorDev zxinsworld at gmail.com
Thu Jul 25 07:54:22 UTC 2024


On Monday, 22 July 2024 at 16:32:38 UTC, Nick Treleaven wrote:
>> and yet it supposedly uses the GC just for iteration?
>
> Do you have an example? The following compiles:
>
> ```d
> void main() @nogc{
>     int[string] aa;
>     foreach (k, v; aa)
>         assert(v);
> }
> ```

I might’ve been thinking about how it couldn’t be used in `@nogc` 
code a year or two ago when we didn’t really have inferred 
`@nogc`.


More information about the Digitalmars-d mailing list