Discussion Thread: DIP 1040--Copying, Moving, and Forwarding--Community Review Round 1

deadalnix deadalnix at gmail.com
Sat Mar 13 21:09:33 UTC 2021


On Saturday, 13 March 2021 at 19:47:35 UTC, 12345swordy wrote:
> On Saturday, 13 March 2021 at 03:06:35 UTC, Walter Bright wrote:
>> On 3/11/2021 10:56 AM, 12345swordy wrote:
>>> How does it handle move constructors when a class have struct 
>>> type variable that is being alias this?
>>
>> #DIP1040 only applies to structs, not classes.
>
> That doesn't answer the question. How does the DIP interact 
> with the current alias this system?
> If I alias this a struct variable with move schematics in 
> struct/class definition called A, does A have the move 
> schematics of the struct variable? Replying "only applied to 
> structs and not classes" isn't helpful here. I am not talking 
> about defining move schematics for classes, I am talking about 
> the class inheriting the struct that has move schematics 
> defined, via alias this.
>
> - Alex

Considering alias this is just an identifier resolution rule, why 
would you expect any interaction whatsoever with move semantics?


More information about the Digitalmars-d mailing list