digitalmars.D.bugs - [Issue 8824] New: std.container.Array fails to instantiate Array!char
- d-bugmail puremagic.com (27/27) Oct 15 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8824
- d-bugmail puremagic.com (13/29) Oct 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8824
http://d.puremagic.com/issues/show_bug.cgi?id=8824 Summary: std.container.Array fails to instantiate Array!char Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: monarchdodra gmail.com --- Comment #0 from monarchdodra gmail.com 2012-10-15 05:29:21 PDT --- Trying to create an actual container (Array) of char elements fails. This is because the allocated payload creates a char[], which is seen as a "string", as opposed to a "array of char". The consequence is that it makes two calls choke: 1) Inside linearRemove: "copy" fails to operate on strings (good thing too). 2) Inside Payload.length: It calls initializeAll, which also fails on strings (arguably a good thing...?). The work around is to simply use Array!dchar or Array!(u)byte. While one could argue that Array!char *should* work, I do not think it is (currently) worth the effort. Filling a bug report anyways. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 15 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8824 monarchdodra gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|nobody puremagic.com |monarchdodra gmail.com --- Comment #1 from monarchdodra gmail.com 2012-10-17 01:39:33 PDT --- (In reply to comment #0)Trying to create an actual container (Array) of char elements fails. This is because the allocated payload creates a char[], which is seen as a "string", as opposed to a "array of char". The consequence is that it makes two calls choke: 1) Inside linearRemove: "copy" fails to operate on strings (good thing too). 2) Inside Payload.length: It calls initializeAll, which also fails on strings (arguably a good thing...?). The work around is to simply use Array!dchar or Array!(u)byte. While one could argue that Array!char *should* work, I do not think it is (currently) worth the effort. Filling a bug report anyways.Actually, I found a way to easily fix this. Assigning to self. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 17 2012