opAssign() calls members' postblits?

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jun 22 02:09:55 PDT 2014


On Saturday, 21 June 2014 at 20:03:26 UTC, Ali Çehreli wrote:
> > Now, http://dlang.org/struct.html#AssignOverload says:
> >
> >      ref S opAssign(S s)
> >      {
>
> Note that opAssign takes by-value. The post-blits that you see 
> are due that copy. i.e. b in main is copied to the argument 
> that opAssign sees.

Thank you, this makes sense now.


More information about the Digitalmars-d-learn mailing list