Preview features status?

Tejas notrealemail at
Wed Jul 14 17:29:37 UTC 2021

On Wednesday, 14 July 2021 at 14:51:41 UTC, Mathias LANG wrote:
> On Wednesday, 14 July 2021 at 08:24:03 UTC, Tejas wrote:
>> Last question:
>> How do you _exactly_ specify that you're expecting a rvalue 
>> reference as a parameter?
>> In other words, what is the D equivalent of this C++ code:
>> ``` func(T&& parameter) {  }```
> There isn't. `in` is for const references. 
> `-preview=rvaluerefparam` will allow you to get a mutable ref, 
> but it simply creates a temporary at the call site (so does 
> `-preview=in`). To my knowledge, we can't represent that in D 
> (and we can't bind to such a definition in C++).

Well... that's not good.

Hope [DIP 
gets here soon then, since rvalue references seem to be 
explicitly mentioned as getting added, or are there caveats in 
that DIP as well?

More information about the Digitalmars-d mailing list