Preview features status?
Mathias LANG
geod24 at gmail.com
Wed Jul 14 14:51:41 UTC 2021
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++).
More information about the Digitalmars-d
mailing list