[Issue 12444] std.array uninitializedArray & minimallyInitializedArray missing APPENDABLE attribute / capacity info

2018-06-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12444

Steven Schveighoffer  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 CC||schvei...@yahoo.com
 Resolution|--- |DUPLICATE

--- Comment #3 from Steven Schveighoffer  ---
Fixed as a side-effect of issue 18995. std.array.array also had the problem
that it wasn't calling the destructors.

The solution is to make uninitializedArray use the druntime equivalent function
(which sets up all the right bits and the finalizers, including APPENDABLE).

*** This issue has been marked as a duplicate of issue 18995 ***

--


[Issue 12444] std.array uninitializedArray minimallyInitializedArray missing APPENDABLE attribute / capacity info

2014-03-24 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=12444


safety0ff.bugz safety0ff.b...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 12444] std.array uninitializedArray minimallyInitializedArray missing APPENDABLE attribute / capacity info

2014-03-24 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=12444


monarchdo...@gmail.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 CC||monarchdo...@gmail.com
 Resolution|INVALID |


--- Comment #2 from monarchdo...@gmail.com 2014-03-24 01:58:57 PDT ---
Just to be clear, this issue is NOT invalid. It's just that your proposed
solution doesn't work.

An implementation that could work is:

T[] uninitializedArray(T)(size_t n)
{
T[] buff; //Declare buff.

//Use the GC to do an Appendable allocation
buff.reserve(n);

//Slice out of bounds
buff = buff.ptr[0 .. n];

//And tell the GC what the actual new bounds are.
buff = assumeSafeAppend(buff);

return buff;
}

This could not work up until now, because `assumeSafeAppend` was not nothrow.
It's not nothrow anymore, but it's not yet pure either, so it still isn't
useable.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 12444] std.array uninitializedArray minimallyInitializedArray missing APPENDABLE attribute / capacity info

2014-03-23 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=12444


safety0ff.bugz safety0ff.b...@gmail.com changed:

   What|Removed |Added

   Keywords||pull


--- Comment #1 from safety0ff.bugz safety0ff.b...@gmail.com 2014-03-23 
21:30:08 PDT ---
https://github.com/D-Programming-Language/phobos/pull/2044

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---