Status on DIP 1040?

Paul Backus snarwin at gmail.com
Tue Aug 3 11:51:38 UTC 2021


On Tuesday, 3 August 2021 at 08:29:15 UTC, Tejas wrote:
>
> I know they're not real(see my original post's 2nd last 
> sentence), but I was working out how to transpile C++ and 
> without being able to represent rvalue refs, it's going to be 
> impossible.
> How can you hope to accurately represent ```t&&``` without 
> rvalue refs?

Perhaps look at how rvalue references are implemented 
under-the-hood in existing C++-to-native-code compilers, and use 
a similar technique in your C++-to-D compiler? After all, there 
is no such thing as an "rvalue reference" in assembly either.

Of course, this means you will have to do some semantic analysis 
on the C++ code to figure out when a parameter is being passed by 
rvalue reference, and translate it accordingly.


More information about the Digitalmars-d mailing list