TDPL: Operator Overloading
Andrej Mitrovic
andrej.mitrovich at gmail.com
Wed Aug 25 07:34:56 PDT 2010
That wasn't my expectation, but nevermind. The example is ok in this case, it's just that care needs to be taken when making operator overloads. So maybe I overreacted a little. :)
Steven Schveighoffer Wrote:
> A struct is a value type, so you are making a copy regardless. Your
> expectation that foo = ... does not wholly replace foo is incorrect.
More information about the Digitalmars-d-learn
mailing list