`@rvalue ref` and `@universal ref`

Quirin Schroll qs.il.paperinik at gmail.com
Tue Jul 16 12:07:06 UTC 2024


On Wednesday, 3 July 2024 at 11:50:19 UTC, Quirin Schroll wrote:
> Add two function parameter attributes `@rvalue` and 
> `@universal` which must be used together with `ref` (similar as 
> `auto` is only valid as `auto ref`).

The `@rvalue` could be used without `ref` to enforce an argument 
is moved into the parameter. “For example, I would want […] a 
parameter storage class that enforces the parameter was moved” in 
[this forum 
post](https://forum.dlang.org/post/v70ajp$2ecn$1@digitalmars.com).


More information about the dip.ideas mailing list