5 this(this) @safe @nogc pure nothrow {}
11 this(this) @safe @nogc nothrow { ++cnt
; }
16 this(this) @safe @nogc pure nothrow {}
20 void test1() @safe @nogc pure nothrow
26 static assert(__traits(hasMember
, Foo
, "__xpostblit"));
38 this(this) @safe @nogc nothrow { ++cnt
; }
45 this(this) @safe @nogc nothrow { ++cnt
; }
51 static assert(!__traits(hasMember
, SNoPostblit
, "__xpostblit"));
52 static assert(!__traits(hasMember
, CNoPostblit
, "__xpostblit"));
54 void test2() @safe @nogc nothrow
57 assert(Counter
.cnt
== 0);
59 assert(Counter
.cnt
== 1);
61 assert(AggrPostblit
.cnt
== 0);
63 assert(AggrPostblit
.cnt
== 1);
66 assert(MixedPostblit
.cnt
== 0);
67 assert(Counter
.cnt
== 0);
69 assert(MixedPostblit
.cnt
== 1);
70 assert(Counter
.cnt
== 1);