[Issue 6256] [patch] std.algorithm.map does not support static arrays and has 'length' for narrow strings.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 19 20:03:36 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=6256



--- Comment #2 from hsteoh at quickfur.ath.cx 2013-08-19 20:03:36 PDT ---
As for iterating over static arrays, one workaround is to slice it:

import std.algorithm, std.range, std.stdio;
void main() {
        uint[4] test = [1,2,3,4];
        writeln(map!(a=>a+10)(test[]));
}

-- 
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