On Thursday, 9 July 2020 at 22:18:59 UTC, Steven Schveighoffer wrote:
Looking at the generated AST, it's because the compiler is adding an auto-generated opAssign, which accepts a Foo by value. It is that object that is being created and destroyed.

Is there a reason the autogenerated opAssign accepts its argument by value? Honestly, it looks like a premature pessimisation to me.

Reply via email to