Postblit constructor

Jiyan jiyan at jiyan.info
Wed Feb 28 18:27:49 UTC 2018


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 it is

"Postlbit from C called".writeln;     in this(this)
and the c from opAssign should get constructed via postblit. 
Doesnt it?


More information about the Digitalmars-d-learn mailing list