In the https://dlang.org/spec/operatoroverloading.html opAssign
is declared as

void opAssign(S rhs);

in the example.

From C++ I'm used to return *this when overloading assignment operators to allow chaining of assignments (or somewhat more rarely, weird tricks for if and while statements), is that not done in D as a rule or is the example just weird? Same question for the
opOpAssign family.


Reply via email to