Safe to remove AA elements while iterating over it via .byKeyValue?

ikod igor.khasilev at gmail.com
Mon Sep 28 10:14:14 UTC 2020


On Monday, 28 September 2020 at 10:10:10 UTC, Per Nordlöw wrote:
> On Monday, 28 September 2020 at 10:01:23 UTC, ikod wrote:
>> Is it specific to some types? What if collection supports 
>> stable "foreach"?
>
> Yes it depends on how collection members (such as insert, find, 
> replace, erase, etc) are implemented.
>
> I presume we need attributes on mutating collection members 
> that describes if the operation invalidates ranges or not.
>


Agree, nice idea!



More information about the Digitalmars-d-learn mailing list