http://d.puremagic.com/issues/show_bug.cgi?id=10201
monarchdo...@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdo...@gmail.com --- Comment #2 from monarchdo...@gmail.com 2013-07-26 13:05:21 PDT --- (In reply to comment #1) > So it is not that dangerous in that sense, but can be used to workaround some > guarantees provided by disabled constructor. Prohibiting all void initalizers > in @safe may be both more simple and consistent. It is dangerous in the sense that for a struct that is not POD, you are violating its internal integrity, at which point, it has no way to guarantee the safety of its own internal operations. I mentioned this in https://github.com/D-Programming-Language/phobos/pull/1434#issuecomment-21644766 with the example: //---- struct S { private size_t index; private ubyte[1] arr; ref ubyte get() @trusted { return arr.ptr[index]; } } void main() @safe { S s = void; ubyte a = s.get(); } //---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------