[Issue 7258] New: std.array.array of mutable range of cost items
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 9 12:46:16 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7258
Summary: std.array.array of mutable range of cost items
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: enhancement
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-01-09 12:46:15 PST ---
I think std.array.array shoult support code like this too, if possible:
import std.algorithm: map;
import std.array: array;
void main() {
auto r = map!(a => cast(const int)a)([1, 2]);
array(r);
}
DMD 2.058 Head:
...\dmd2\src\phobos\std\array.d(55): Error: result[i] isn't mutable
test.d(5): Error: template instance std.array.array!(Result) error
instantiating
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list