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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 24 06:43:46 PST 2013


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

           Summary: std.algorithm.map!(T) cause CT error for fixed size
                    arrays
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: marmyst at gmail.com


--- Comment #0 from Marcin Mstowski <marmyst at gmail.com> 2013-02-24 06:43:45 PST ---
void main() {
  float[5] smt = [0, 1, 2, 4, 100];
  auto ms = map!"a*a"(smt);
}

DMD 2.062 gives: 

dmd test.d
test.d(5): Error: template std.algorithm.map!("a*a").map does not match any
function template declaration. Candidates are:
..\..\src\phobos\std\algorithm.d(379):       
std.algorithm.map!("a*a").map(Range)(Range r) if
(isInputRange!(Unqual!(Range)))
test.d(5): Error: template std.algorithm.map!("a*a").map(Range)(Range r) if
(isInputRange!(Unqual!(Range))) cannot deduce template function from argument
types!()(float[5u])

Dynamic arrays for map!T and reduce!T with static arrays (not tested for others
functions) compile without problem.

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