How do you make a copy TO and object when you're INSIDE of it?

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 24 01:47:37 PDT 2015


Apart from what others have said, for a class `this` is the 
_reference_ to the current object, i.e. a "pointer". If the 
compiler allowed assigning to it, it would not modify the 
contents of your object.

If you want to assign all of the elements at once, you can use 
`tupleof` (untested):

     this.tupleof = other.tupleof;


More information about the Digitalmars-d-learn mailing list