Enumap -- a lightweight AA alternative when your keys are enums

rcorre via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Sep 11 04:53:16 PDT 2015


On Friday, 11 September 2015 at 04:30:31 UTC, SimonN wrote:
>
> Since I have been using "ref val" in the first loop, I expected 
> the output to be instead:
>
>     e1: 101
>     e2: 102
>     e3: 103
>     e1: 104
>     e2: 105
>     e3: 106
>
> -- Simon

Yep, as I was looking at the constness thing, I realized that ref 
parameters in foreach are totally broken. I may just have to use 
opApply instead of opSlice.


More information about the Digitalmars-d-announce mailing list