Discussion Thread: DIP 1040--Copying, Moving, and Forwarding--Community Review Round 1
deadalnix
deadalnix at gmail.com
Mon Mar 22 09:33:11 UTC 2021
On Sunday, 21 March 2021 at 21:33:47 UTC, Max Haughton wrote:
> Is that strictly a move or "just" the struct ABI? i.e. If I add
> a destructor then we do go through [RDI].
>
It's not "just an ABI thing". It means that the original address
of the struct is never passed down. And if it is never passed
down, it is not even possible to attempt to not move the struct.
As for the destruction thing, I assume this because dmd/ldc
decided to go with the same ABI as C++ and non POD are passed by
ref, always, due to the way C++ does its business (I already
described this in great length in the topic).
More information about the Digitalmars-d
mailing list