[Issue 9582] std.algorithm.map!(T) cause CT error for fixed size arrays

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 24 07:31:51 PST 2013


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


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #1 from bearophile_hugs at eml.cc 2013-02-24 07:31:48 PST ---
(In reply to comment #0)

> void main() {
>   float[5] smt = [0, 1, 2, 4, 100];
>   auto ms = map!"a*a"(smt);
> }

Only certain higher order functions of Phobos work with fixed-sized arrays:


import std.algorithm: reduce;
void main() {
    float[5] smt = [0, 1, 2, 4, 100];
    assert(reduce!"a+b"(smt) == 107); // OK.
}


So probably this bug report should be closed.

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