www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - opPostMove in druntime but not in dmd?

reply Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
I wan't aware that `opPostMove` has been implemented as a 
callback to `move` inside the druntime!

https://dlang.org/library/std/traits/has_elaborate_move.html

Why hasn't support for dmd been added already?
Lack of time?
Nov 15 2020
parent reply Paul Backus <snarwin gmail.com> writes:
On Sunday, 15 November 2020 at 13:43:19 UTC, Per Nordlöw wrote:
 I wan't aware that `opPostMove` has been implemented as a 
 callback to `move` inside the druntime!

 https://dlang.org/library/std/traits/has_elaborate_move.html

 Why hasn't support for dmd been added already?
 Lack of time?
I believe that opPostMove was abandoned in favor of move constructors for more or less the same reason that postblits were abandoned in favor of copy constructors (that is, problems with const/immutable). I'm not sure what the current status of move constructors is.
Nov 15 2020
parent Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Sunday, 15 November 2020 at 13:49:59 UTC, Paul Backus wrote:
 I believe that opPostMove was abandoned in favor of move 
 constructors for more or less the same reason that postblits 
 were abandoned in favor of copy constructors (that is, problems 
 with const/immutable).
Ahh. I kind of knew that. Thanks.
Nov 15 2020