[Issue 5952] New: map(AA.byValue()) problem

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 7 16:31:10 PDT 2011


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

           Summary: map(AA.byValue()) problem
           Product: D
           Version: unspecified
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2011-05-07 16:27:16 PDT ---
import std.algorithm;
void main() {
    int[int] hash = [1:2, 3:4];
    auto vals = hash.byValue();
    map!q{a}(vals); // error
}


The line of code with "map" causes this (DMD 2.053beta):

test.d(5): Error: template std.algorithm.map!("a").map(Range) if
(isInputRange!(Unqual!(Range))) does not match any function template
declaration
test.d(5): Error: template std.algorithm.map!("a").map(Range) if
(isInputRange!(Unqual!(Range))) cannot deduce template function from argument
types !()(int delegate(int delegate(ref int) dg))

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