<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 3 Oct 2024 at 03:21, Walter Bright via Digitalmars-d <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 10/1/2024 1:15 PM, Timon Gehr wrote:<br>
> I guess the new implementation you have in mind is something like the following?<br>
> <br>
> ```d<br>
> auto move(T)(ref T arg)=>__rvalue(arg);<br>
> ```<br>
<br>
Not exactly. __rvalue would also convert an rvalue to an rvalue.<br></blockquote><div><br></div><div>-preview=rvaluerefparams addresses this; it allows an rvalue to be supplied to the lvalue there. It's actually an essential mechanic to this whole thing, because it will allow the appropriate selection of copy/move overloads where a type may define either one, or both. If a copy and/or move constructor exists, it needs to select the proper one, and the -preview handles that properly as is.<br></div></div></div>