digitalmars.D.learn - operator +=
- Minas Mina (1/1) Apr 08 2013 How can I define operator += for a struct?
- Simen Kjaeraas (10/11) Apr 08 2013 http://dlang.org/operatoroverloading.html
- Minas Mina (2/11) Apr 08 2013 Thanks a lot.
How can I define operator += for a struct?
Apr 08 2013
On 2013-04-08, 14:23, Minas Mina wrote:How can I define operator += for a struct?http://dlang.org/operatoroverloading.html In short: struct S { auto opOpAssign( string op : "+" )( S other ) { // Do stuff here. } } -- Simen
Apr 08 2013
On Monday, 8 April 2013 at 12:37:34 UTC, Simen Kjaeraas wrote:On 2013-04-08, 14:23, Minas Mina wrote:Thanks a lot.How can I define operator += for a struct?http://dlang.org/operatoroverloading.html In short: struct S { auto opOpAssign( string op : "+" )( S other ) { // Do stuff here. } }
Apr 08 2013