Move Constructor Syntax
Timon Gehr
timon.gehr at gmx.ch
Thu Oct 17 13:14:36 UTC 2024
On 10/17/24 15:11, Timon Gehr wrote:
>
>
>> Can you explain to me how every other function call isn't broken under
>> the special-case-for-move-constructor solution?
>
> Move semantics still needs a separate solution, but this thread is about
> move constructors. Move constructors are not needed for move semantics,
> they are needed to manually hook moves that involve a transfer of values
> between different memory locations.
Maybe here part of your question was why special-casing move
constructors solves the overload resolution issue? The issue is an
implementation detail that no longer occurs when move constructor and
copy constructor are not functions in the same overload set.
I think it is a nice side-effect that this problem is fixed, but it
should not be the main motivation for special move constructor syntax.
More information about the Digitalmars-d
mailing list