https://issues.dlang.org/show_bug.cgi?id=13903

Steven Schveighoffer <schvei...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schvei...@yahoo.com

--- Comment #2 from Steven Schveighoffer <schvei...@yahoo.com> ---
(In reply to Seb from comment #1)

> auto removeIf(alias pred, AA)(AA aa)
> {
>     aa.byPair.filter!(not!pred).each!(e => aa.remove(e.key));
>     return aa;
> }

This implementation isn't valid. You can't remove while iterating. You would
need to somehow lock the AA from rehashing as you removed items.

--

Reply via email to