Operators overloading in D2

Larry Luther larry.luther at dolby.com
Mon May 17 13:38:49 PDT 2010


Hi, Dan used the following method for his vector class:

  void opOpAssign (string op:"+=")(ref Vector3 other) {...}

Why the "ref"?  As I understand it, objects of class vector
would already be passed as references.

  Larry 




More information about the Digitalmars-d-learn mailing list