On Thursday, 10 January 2013 at 23:37:14 UTC, Namespace wrote:
Without a declared opAssign, this

  S s3;
  s3 = s1;

also calls the postblit. That is strange.

If there is no user declared opAssign, then opAssign is implemented in terms of postblit. It's designed that way.

This is kind of like C++'s copy and swap idiom, but built into the language.

Reply via email to