[Issue 16197] Constructors/postblits and destructors don't match up for array initialisation

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Jun 23 10:06:11 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16197

--- Comment #6 from Steven Schveighoffer <schveiguy at yahoo.com> ---
I'm not saying there's no issue here, just that the fact that you are not
matching the addresses of the structs together doesn't necessarily mean
anything bad. The compiler could be running the ctor on some piece of memory,
and then just moving into the right spot without calling postblit or dtor
(seems wasteful, but certainly legal).

BTW, things can likely get a lot clearer if we reduce the array size to 1. No
reason to triple the output!

BTW, the postblit for the -1 values seems incorrect...

--


More information about the Digitalmars-d-bugs mailing list