> mixin template logIt()
> {
> static shared this()
> {
> log(typeof(this).stringof ~ " init");
> }
>
> static shared ~this()
> {
> log(typeof(this).stringof ~ " deinit");
> }
> }
Try "shared static this()" and it won't run as a class constructor.
http://dlang.org/class.html#StaticConstructor