Move Constructor Syntax
An
d at home.com
Fri Oct 18 23:00:25 UTC 2024
On Monday, 14 October 2024 at 02:49:42 UTC, Walter Bright wrote:
> On 10/11/2024 8:44 AM, Manu wrote:
>> No that's wrong; this is EXACTLY the situation that move
>> semantics exist to address. Move constructor like this should
>> ACTUALLY BE a move constructor!
>
> But currently this(S) is an rvalue constructor, not a move
> constructor. I've said this many times.
>
> Changing it would break existing code.
What about considering these syntax in new Edition that D is
advocate for breaking changes?
`this(S)`, `this(ref S)`, `opAssign(S)`, `opAssign(ref S)`
More information about the Digitalmars-d
mailing list