← Back to index
|
Original Bugzilla link
Bug 15863 – .length for AA.byKey
Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-04-01T21:30:00Z
Last change time
2016-04-04T11:35:01Z
Keywords
pull
Assigned to
nobody
Creator
yshuiv7
Comments
Comment #0
by yshuiv7 — 2016-04-01T21:30:00Z
This will enable us to pass .byKey to functions which require hasLength!Range.
Comment #1
by yshuiv7 — 2016-04-02T00:16:10Z
So I gave it a try:
https://github.com/D-Programming-Language/druntime/pull/1530
Comment #2
by code — 2016-04-04T11:35:01Z
You can use takeExactly for this.
http://dlang.org/phobos/std_range.html#.takeExactly
--- aa.byKey.takeExactly(aa.length) aa.byValue.takeExactly(aa.length) ---