Thread overview | ||||||
---|---|---|---|---|---|---|
|
May 07, 2011 [Issue 5952] New: map(AA.byValue()) problem | ||||
---|---|---|---|---|
| ||||
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@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@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: ------- |
May 08, 2011 [Issue 5952] map(AA.byValue()) problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5952 kennytm@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |kennytm@gmail.com Resolution| |DUPLICATE --- Comment #1 from kennytm@gmail.com 2011-05-08 00:00:18 PDT --- That's because byValue returns an opApply delegate, not a range. *** This issue has been marked as a duplicate of issue 4264 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 08, 2011 [Issue 5952] map(AA.byValue()) problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5952 --- Comment #2 from bearophile_hugs@eml.cc 2011-05-08 03:35:46 PDT --- (In reply to comment #1) > That's because byValue returns an opApply delegate, not a range. > > *** This issue has been marked as a duplicate of issue 4264 *** This is not a duplicate of 4264. Here I am not asking map() to use opApply, I am asking byValue() to be a Range, if possible. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 08, 2011 [Issue 5952] map(AA.byValue()) problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5952 --- Comment #3 from kennytm@gmail.com 2011-05-08 04:37:55 PDT --- (In reply to comment #2) > (In reply to comment #1) > > That's because byValue returns an opApply delegate, not a range. > > > > *** This issue has been marked as a duplicate of issue 4264 *** > > This is not a duplicate of 4264. Here I am not asking map() to use opApply, I > am asking byValue() to be a Range, if possible. Then it is still a dup of bug 4607. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation