Code



Compilation output:

class MagicClass : BaseClass { T members; this() { foreach(i, TI; T){ members[i] = new typeof(members[i])(); } } void printSelf() { foreach(i, TI; T){ members[i].printSelf(); } } }


Application output:

I am: WorstChild I am: MiddleChild I am: BestChild

Paste info


Author: Guest
Views: 1555
Private: no
Expires: Never
Uploaded: 16.10.13 10:25
Votes: 0

Compilation


Compiler: DMD 2.077.1 ( 2.077.1 )
Pointer size: m64

Actions