A problem with AAs

bearophile bearophileHUGS at lycos.com
Thu Jan 24 07:37:59 PST 2008


Jarrett Billingsley:
> That's probably the best you _can_ do.  The issue, as usual, arises from AA 
> literals being weird.

Thank you for your answer, then I'll probably restrict the usage of those functions, refusing at compile time the AAs with static arrays.

But I think that can't be classified as a problem of AA literals, a literal is a way to define something in the code. I think the problem there is that the opApply() doesn't allow you to yield a reference to a static array (regardless the way you have defined the AA in your source code... I may want an AA with a static array as values anyway). (I don't fully understand still the inner workings of opApply, do you know why it has such limitation?)

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list