tesTremor at gmail.com
Tue Jul 2 08:23:23 UTC 2019
On Tuesday, 2 July 2019 at 07:48:06 UTC, RazvanN wrote:
> After implementing the copy constructor as a substitute for the
> postblit, we realized that the fundamental flaw that the
> postblit had (automatic copying) would also manifest in the
> case of opPostMove; in Shachars' there is no mention what
> happens when the source and destination are differently
> qualified. I suspect that before implementing the DIP we need
> to sort this out and it might be preferable to imlement a move
> constructor a la C++ rather then rely on automatic moving.
Maybe this is work for us ?
1. opPostMove always apply to same qualified type
2. If the opPostMove apply to immutable instance, it should call
copyConstructor instead. The diff from copyConstructor with
opPostMove, the original instance is dropped without call dtor.
3. The original instance should be scope instance without any
More information about the Digitalmars-d