digitalmars.D.bugs - [Issue 4821] New: std.array.insert on string[]
- d-bugmail puremagic.com (37/37) Sep 05 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4821
- d-bugmail puremagic.com (15/15) Sep 28 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4821
- d-bugmail puremagic.com (9/9) Sep 30 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4821
http://d.puremagic.com/issues/show_bug.cgi?id=4821 Summary: std.array.insert on string[] Product: D Version: D2 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 This D2 program correctly inserts the int 10 at the first position of an empty array (dmd 2.048): import std.array: insert; void main() { int[] a; a.insert(0, 10); assert(a == [10]); } But a similar program doesn't work with an array of strings: import std.array: insert; void main() { string[] a; a.insert(0, "hello"); } Errors: ...\dmd\src\phobos\std\array.d(518): Error: cannot implicitly convert expression (e) of type immutable(char) to string ...\dmd\src\phobos\std\array.d(14): Error: template instance std.array.insert!(string,string) error instantiating (A related necessary function std.array.remove is missing.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 05 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4821 Dmitry Olshansky <dmitry.olsh gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmitry.olsh gmail.com 09:11:36 PDT --- insert probably got deprecated with time. But this code works for me: import std.array: insertInPlace; void main() { string[] a; a.insertInPlace(0, "hello"); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 28 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4821 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 30 2012