Thread overview
[Issue 13619] std.container.array capacity not updated when length increases
Oct 21, 2014
safety0ff.bugz
Oct 21, 2014
thedeemon
Oct 22, 2014
safety0ff.bugz
Dec 23, 2016
Eduard Staniloiu
October 19, 2014
https://issues.dlang.org/show_bug.cgi?id=13619

monarchdodra@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra@gmail.com

--- Comment #1 from monarchdodra@gmail.com ---
That's not fixed yet !?

--
October 21, 2014
https://issues.dlang.org/show_bug.cgi?id=13619

safety0ff.bugz <safety0ff.bugz@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |safety0ff.bugz@gmail.com

--- Comment #2 from safety0ff.bugz <safety0ff.bugz@gmail.com> ---
I think the bug you reported is not valid.
However, there is a bug when using length to shorten the array:

import std.container;

void main() {
  Array!int a; // empty Array
  a.length = 10; // a contains 10 default ints
  a.length = 9; // Remove one, should have capacity > 0
  assert(a.capacity > 0);
}

--
October 21, 2014
https://issues.dlang.org/show_bug.cgi?id=13619

--- Comment #3 from thedeemon <dlang@thedeemon.com> ---
Why do you think it's not valid?

It does throw runtime error and capacity is wrong after setting the length. http://dpaste.dzfl.pl/b10858af2a56

--
October 22, 2014
https://issues.dlang.org/show_bug.cgi?id=13619

--- Comment #4 from safety0ff.bugz <safety0ff.bugz@gmail.com> ---
Ah, I misinterpreted the meaning of the capacity (unused capacity vs total
capacity.)

Perhaps the title should be "std.container.array capacity not updated when changing length" or something like that since it's not specific to increasing length.

--
December 23, 2016
https://issues.dlang.org/show_bug.cgi?id=13619

Eduard Staniloiu <edi33416@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |trivial
                 CC|                            |edi33416@gmail.com

--
March 11, 2017
https://issues.dlang.org/show_bug.cgi?id=13619

--- Comment #5 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/8ba7ce59ba4bbeb1e7f45fb34ecff2a02930aad9 Fix issue 13619 - array capacity not updated when changing length

https://github.com/dlang/phobos/commit/9872247505c8a62e87bb97010084406c051eed2f Merge pull request #5267 from byebye/issue_13619

Fix issue 13619 - array capacity not updated when changing length merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>

--
March 11, 2017
https://issues.dlang.org/show_bug.cgi?id=13619

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
March 22, 2017
https://issues.dlang.org/show_bug.cgi?id=13619

--- Comment #6 from github-bugzilla@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/8ba7ce59ba4bbeb1e7f45fb34ecff2a02930aad9 Fix issue 13619 - array capacity not updated when changing length

https://github.com/dlang/phobos/commit/9872247505c8a62e87bb97010084406c051eed2f Merge pull request #5267 from byebye/issue_13619

--
August 07, 2017
https://issues.dlang.org/show_bug.cgi?id=13619

--- Comment #7 from github-bugzilla@puremagic.com ---
Commits pushed to newCTFE at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/8ba7ce59ba4bbeb1e7f45fb34ecff2a02930aad9 Fix issue 13619 - array capacity not updated when changing length

https://github.com/dlang/phobos/commit/9872247505c8a62e87bb97010084406c051eed2f Merge pull request #5267 from byebye/issue_13619

--
January 05, 2018
https://issues.dlang.org/show_bug.cgi?id=13619

--- Comment #8 from github-bugzilla@puremagic.com ---
Commits pushed to dmd-cxx at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/8ba7ce59ba4bbeb1e7f45fb34ecff2a02930aad9 Fix issue 13619 - array capacity not updated when changing length

https://github.com/dlang/phobos/commit/9872247505c8a62e87bb97010084406c051eed2f Merge pull request #5267 from byebye/issue_13619

--