On Monday, 25 January 2021 at 17:09:22 UTC, Jack wrote:
I'd like to make this work s += 10 where s is a struct. How can I do that?
+=, -=, *=, and other compound assignment operators can be overloaded by defining `opOpAssign`:
https://dlang.org/spec/operatoroverloading.html#op-assign