Bug 13565 – add AA batch remove using a predicate function

Status
NEW
Severity
enhancement
Priority
P4
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-10-01T22:04:49Z
Last change time
2024-12-07T13:34:21Z
Assigned to
No Owner
Creator
Martin Nowak
Moved to GitHub: dmd#17135 →

Comments

Comment #0 by code — 2014-10-01T22:04:49Z
To remove multiple AA entries at once we should support calling aa.remove with a predicate function, taking key and value. Old code: Louter: while (true) { Key key; foreach (k, v; aa) { if (!pred(k, v)) continue; aa.remove(k); continue Louter; } break; } New code: aa.remove((k, v) => pred(k, v));
Comment #1 by robert.schadek — 2024-12-07T13:34:21Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17135 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB