[Issue 11561] Built-in array .capacity returns 0 if array length is decreased
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 20 02:58:35 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11561
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |yebblies at gmail.com
Resolution| |INVALID
--- Comment #1 from yebblies <yebblies at gmail.com> 2013-11-20 21:58:19 EST ---
No, this is correct. A capacity of zero simply means the slice cannot be
appended to.
http://dlang.org/phobos/object.html#.capacity
If an append must reallocate a slice with no possibility of extension, then 0
is returned. This happens when the slice references a static array, or if
another slice references elements past the end of the current slice.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list