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

--- Comment #0 from 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]);

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

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to