On Monday, 13 April 2015 at 03:37:17 UTC, Adam D. Ruppe wrote:



The example in the first point of "void initialization" is wrong:

    YourStruct s = YourStruct();

With `@disable this()`, this doesn't work either. But this does:

    YourStruct s = YourStruct.init;

About point 3, the following should be added so as not to mislead beginners: This is assignment, not construction! This is an important distinction, because your type's opAssign() and ~this() can then be invoked on an uninitialized object. They need to be aware of that possibility.

Reply via email to