<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 17 Oct 2024, 23:17 Timon Gehr 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 10/17/24 15:11, Timon Gehr wrote:<br>
> <br>
> <br>
>> Can you explain to me how every other function call isn't broken under <br>
>> the special-case-for-move-constructor solution?<br>
> <br>
> Move semantics still needs a separate solution, but this thread is about <br>
> move constructors. Move constructors are not needed for move semantics, <br>
> they are needed to manually hook moves that involve a transfer of values <br>
> between different memory locations.<br>
<br>
Maybe here part of your question was why special-casing move <br>
constructors solves the overload resolution issue? The issue is an <br>
implementation detail that no longer occurs when move constructor and <br>
copy constructor are not functions in the same overload set.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I understand it's an implementation challenge; Razvan talked about it a bit, but it's the same implementation challenge as any normal function overloaded the same way afaict. It has to be solved in general.</div><div dir="auto">...at which point, the problem will already have been resolved with respect to the constructor too, and none of this discussion about the constructor actually exists. The general solution naturally solves the constructor case without any additional attention.</div><div dir="auto"><br></div><div dir="auto">I don't think you should talk about the hack as if it's worthy of attention, because the rest of the work naturally factors this problem out of existence, so it's all just a misleading waste of thought and breath. It seems to be confusing people fundamentally.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think it is a nice side-effect that this problem is fixed, but it <br>
should not be the main motivation for special move constructor syntax.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">It's a hack, and I actually think it's just basically counterproductive to humour this train of thought, because it seems to be perpetuating confusion and leading people away from understanding what move semantics even are. Help them arrive at the understanding that this issue doesn't actually exist, and doesn't require a 'solution'.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>