Are associative arrays stable in D?
Mike Parker
aldacron at gmail.com
Wed Jul 17 01:30:59 PDT 2013
On Tuesday, 16 July 2013 at 19:37:14 UTC, Gary Willoughby wrote:
>
> If however you remove the .byKey() call and use .keys instead,
> it works!
>
With byKey, you are iterating over a range of original key
values, meaning that attempting to remove any of them will result
in bad bahavior. With .keys, you are iterating over a copied
array of the keys, hence it's safe to remove them from the aa.
More information about the Digitalmars-d-learn
mailing list