Move Constructor Syntax

Manu turkeyman at gmail.com
Fri Oct 11 15:44:54 UTC 2024


On Thu, 10 Oct 2024, 17:22 Walter Bright via Digitalmars-d, <
digitalmars-d at puremagic.com> wrote:

> On 10/8/2024 11:08 PM, Jonathan M Davis wrote:
> > So, if
> >
> >      this(S)
> >
> > suddenly becomes a move constructor, existing code will have a normal
> > constructor suddenly turned into a move constructor.
>
> Yup. Kaboom.
>

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!

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20241012/9c3b15f5/attachment.htm>


More information about the Digitalmars-d mailing list