http://d.puremagic.com/issues/show_bug.cgi?id=11194
Summary: std.container.Array.reserve calls opAssign on
uninitialized data
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from S�nke Ludwig <[email protected]> 2013-10-08 04:54:44
PDT ---
The following test case fails:
---
import std.container;
struct S {
int i = 1337;
void opAssign(S other)
{
assert(i == 1337);
}
}
void main()
{
Array!S arr;
arr ~= S.init;
}
---
The same applies for "~this() { assert(i == 1337); }" instead of defining
opAssign.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------