DIP 1014:Hooking D's struct move semantics--Community Review Round 1
kinke
noone at nowhere.com
Fri May 18 19:57:09 UTC 2018
On Thursday, 17 May 2018 at 19:11:27 UTC, Shachar Shemesh wrote:
> On 17/05/18 18:47, kinke wrote:
> Since clang is able to compile this struct and do everything
> with it, and since the existence of the move constructor
> requires the precise same type of hooking as is needed in this
> case, I tend to believe that an IR representation of DIP 1014
> is possible.
I checked, and the reason is that D and C++ use a different ABI
wrt. by-value passing of non-POD arguments. C++ indeed passes a
reference to a caller-allocated rvalue, not just on Win64; that
makes it trivial, as there are no moves across call boundaries.
But your proposal may imply changing the D ABI accordingly.
More information about the Digitalmars-d
mailing list