Bug 11753 – byKeyValue missing from built-in hashtables

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-16T14:56:00Z
Last change time
2013-12-16T15:58:51Z
Assigned to
nobody
Creator
andrei

Comments

Comment #0 by andrei — 2013-12-16T14:56:10Z
There's no range to iterate keys and values simultaneously in a built-in hash table. foreach offers a baked-in way to iterate over keys and values with "foreach (k, v; table)" but that cannot be passed down to algorithms. The range returned by byKeyValye() should allow modifying the value but not the key.
Comment #1 by bearophile_hugs — 2013-12-16T14:57:58Z
Dupe of Issue 5466 ?
Comment #2 by andrei — 2013-12-16T15:58:51Z
*** This issue has been marked as a duplicate of issue 5466 ***