study: use checkedint as a drop-in replacement of native long

Q. Schroll qs.il.paperinik at gmail.com
Wed Mar 24 17:23:00 UTC 2021


On Tuesday, 18 August 2020 at 01:23:01 UTC, Andrei Alexandrescu 
wrote:
> Requiring user-defined assignment to `return *this;` was goofy 
> in C++. Requiring user-defined assignment to `return this;` is 
> goofy in D. Assignment should return void and the compiler 
> should take care of it.

Do you mean the compiler should take care of returning *this when 
opAssign returns void? Because there are some use-cases for 
opAssign to return something different than `this`, but I cannot 
remember at the moment what it was. It's a niche case.


More information about the Digitalmars-d mailing list