Re: Postblit constructor

2018-03-02 Thread Simen Kjærås via Digitalmars-d-learn
On Wednesday, 28 February 2018 at 18:23:04 UTC, Jiyan wrote: The nodes are only allocated over malloc(). So i have to take care of the initialisation myself. The problem is, that i found out by debugging, that it seems that when i call val.opAssign(op) in constructNodeFrom(), there isn't any po

Re: Postblit constructor

2018-03-02 Thread Eduard Staniloiu via Digitalmars-d-learn
On Wednesday, 28 February 2018 at 18:27:49 UTC, Jiyan wrote: On Wednesday, 28 February 2018 at 18:23:04 UTC, Jiyan wrote: Hey, i thought i had understood postblit, but in my Code the following is happening (simplified): struct C { this(this){/*Do sth*/} list!C; void opAssign(const C c) { "P

Re: Postblit constructor

2018-02-28 Thread Jiyan via Digitalmars-d-learn
On Wednesday, 28 February 2018 at 18:23:04 UTC, Jiyan wrote: Hey, i thought i had understood postblit, but in my Code the following is happening (simplified): struct C { this(this){/*Do sth*/} list!C; void opAssign(const C c) { "Postlbit from C called".writeln; // Do sth } } Sry of course