<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 1 Oct 2024, 17:03 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 9/30/2024 8:29 PM, Richard (Rikki) Andrew Cattermole wrote:<br>
> Perhaps an attribute, like ``@move`` in core.attributes would be sufficient for <br>
> this task ;)<br>
<br>
<br>
It's an interesting idea, but a lot of details would need to be worked out. For <br>
instance, the core.attributes.move is a version of the move assignment operator, <br>
not move construction. Then there is the problem of distinguishing between a <br>
move constructor and a copy constructor - how do they overload against each <br>
other? There's what a default move constructor should be. There's what happens <br>
when a field of a struct has a move constructor.<br>
<br>
And so on.<br>
<br>
BTW, I took a look at core.lifetime.move. It's hard to figure out just what it <br>
does, as there are vacuous forwardings to other templates.<br>
<br>
For example:<br>
```<br>
void move(T)(ref T source, ref T target)<br>
{<br>
     moveImpl(target, source);<br>
}<br>
```<br>
Why?</blockquote></div></div><div dir="auto"><br></div><div dir="auto">Because D is so fundamentally broken in this department. Work your way through a clear understanding of core.lifetime, and you should become convinced how important this work you are doing actually it's!</div><div dir="auto"></div></div>