On Thursday, 23 November 2017 at 15:26:03 UTC, Timoses wrote:
    A aaa = a;

That's initialization, not assignment, which is subtly different. It will call the postblit on aaa instead of opAssign. A postblit can be defined this way:

this(this)
{

}

There is no way to access the original a from the postblit. All fields have already been copied, you can use it to duplicate reference types, increment reference counts, and other things like that.

Reply via email to