Move Constructor Syntax
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Sun Oct 6 23:09:21 UTC 2024
On 07/10/2024 5:56 AM, Walter Bright wrote:
> On 10/6/2024 2:58 AM, Richard (Rikki) Andrew Cattermole wrote:
>> Does that not have desirable potential additions, once move
>> constructors have been resolved?
>> For now, it can error if seen elsewhere.
>
> I know you've proposed @move for parameters already, but this seems
> inconsistent with that.
For parameters yes, I'd prefer that a copy constructor turned into a
move constructor wasn't some special thing. But if you really want it to
be a different overload set, well do it on the function to define it.
```d
this(ref Thing other) @move {
}
```
More information about the Digitalmars-d
mailing list