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

Reply via email to