Discussion: Rvalue refs and a Move construtor for D

Suleyman sahmi.soulaimane at gmail.com
Sun Sep 8 01:15:12 UTC 2019

On Sunday, 8 September 2019 at 00:46:22 UTC, Suleyman wrote:
> At this point we should consider having an rvalue pointer type. 
> We have concluded that preserving the rvalueness of a ref 
> (which is simply a pointer) is valuable, we could take it 
> further and save the rvalueness in pointer types as well. I 
> find it strange that you cant declare a pointer to an rvalue 
> ref in C++ for example `int&&*`.

This can be achieved with either an rvalue type modifier like 
const and shared or with a type suffix like &. Then parameters 
could be declared as a ref or a pointer to an rvalue'ed type.

More information about the Digitalmars-d mailing list