digitalmars.D.bugs - [Issue 9823] New: Delegate accepting element not accepted in std.range.put
- d-bugmail puremagic.com (38/38) Mar 27 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9823
- d-bugmail puremagic.com (10/10) Jul 27 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9823
- d-bugmail puremagic.com (11/11) Jul 27 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9823
http://d.puremagic.com/issues/show_bug.cgi?id=9823 Summary: Delegate accepting element not accepted in std.range.put Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: Jesse.K.Phillips+D gmail.com 22:26:28 PDT --- When providing a delegate to the std.range.put() function, compilation fails. import std.range; void main() { string[] nameList1 = ["Anders", "David", "James", "Jeff", "Joe"]; void mySink(in char[] a) { } auto r = &mySink; static assert(isOutputRange!(typeof(r), string)); // Passes put(r, nameList1); // Fails } std/range.d(611): Error: static assert "Cannot put a string[] into a void delegate(const(char[]) a)" ------ This appears to be an issue of line 597 else static if ((usingPut || usingFront) && isInputRange!E && is(typeof(put(r, e.front)))) { for (; !e.empty; e.popFront()) put(r, e.front); } Where it should be checking (!usingPut && !usingFront) as they refer to usingPut: Use put method from struct or class. usingFront: Output range is an InputRange and may accept assignment to front. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 27 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9823 yebblies <yebblies gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yebblies gmail.com *** Issue 10571 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 27 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9823 yebblies <yebblies gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull Turned into a pull request: https://github.com/D-Programming-Language/phobos/pull/1437 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 27 2013