Struct delegate access corruption
vitamin
vit at vit.vit
Thu Feb 18 11:00:50 UTC 2021
On Thursday, 18 February 2021 at 08:29:48 UTC, kinke wrote:
> On Wednesday, 17 February 2021 at 20:44:46 UTC, tsbockman wrote:
>> On Wednesday, 17 February 2021 at 20:18:53 UTC, Paul Backus
>> wrote:
>>> [...]
>>
>> That bug is about postblits, this(this), not copy
>> constructors: this(ref typeof(this)). Copy constructors were
>> added to the language specifically to fix those sort of
>> problems.
>
> Nope, Paul is right, the copy ctors don't solve anything in
> this regard. Simplest example I could come up with:
> https://run.dlang.io/is/TgxyU3
opPostMove
https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1014.md can solve this problem but it isn't implemented;
More information about the Digitalmars-d-learn
mailing list