import std.meta : AliasSeq; foreach (E; AliasSeq!(int, double)) { enum n = 42; E[n] c; const result = c.map!(_ => _^^2); static assert(c.length == result.length); static assert(is(typeof(result) == const(E)[n])); }
http://forum.dlang.org/thread/rqlittlysttwxwphlnmh@forum.dlang.org TODO Add to Phobos
Static array overload for std.algorithm.iteration.map.