Pitfalls of delegates inside ranges

Artur Skawina art.08.09 at gmail.com
Wed Sep 4 04:26:10 PDT 2013


On 09/03/13 12:00, Sönke Ludwig wrote:
> Am 02.09.2013 15:39, schrieb Artur Skawina:
>>
>>      this(this) { jump.ptr = &this; }
>>
> 
> Just a warning: This can still easily crash due to D's struct move semantics. Structs are moved around sometimes without any postblit constructor or destructor being called, so fixing self-references like this won't work in general.

Yes. Thanks for catching this.
I tend to ignore the broken/hacky/incomplete parts of the language,
and forgot about it.


artur


More information about the Digitalmars-d-learn mailing list