Bug 7523 – Incorrect capacity for new T[] with non-zero T.init.
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-16T12:04:00Z
Last change time
2012-02-27T11:10:01Z
Keywords
pull
Assigned to
nobody
Creator
sandford
Comments
Comment #0 by sandford — 2012-02-16T12:04:41Z
auto foo = new float[10];
auto bar = new int[10];
assert(bar.capacity == 15);
assert(foo.capacity == 0, "This should be 15");
assert(foo.capacity == bar.capacity); // fails