Discussion: Rvalue refs and a Move construtor for D
noone at nowhere.com
Fri Sep 6 18:13:03 UTC 2019
On Friday, 6 September 2019 at 17:46:51 UTC, Manu wrote:
> It's relevant because the calling convention needs to be
> defined, and
> it's volatile with respect to architecture.
> I don't think defining a custom ABI this way is a good path.
> It's just
> different problems, and ABI problems are always bad problems.
It'd just make the D ABI conform to the C++ ABI wrt. passing
non-PODs and large PODs by value, making the compilers adhere to
the D spec *and* fixing C++ interop when passing such structs by
value across language barriers, soomething you're surely looking
So the proposed ABI change (pass by ref instead of on stack & let
callER destruct it) is the exact opposite of what you seem to see
it as - it's streamlining the D ABI with C++. And it's orthogonal
to the proposed move/forward intrinsics.
More information about the Digitalmars-d