Mixin Global Variables

Brian White bcwhite at pobox.com
Wed Mar 19 06:20:23 PDT 2008


> template foo(T)
> {
>     T bar;
>     static this()
>     {
>         bar = something();
>     }
> }
> 
> mixin foo!(int);

That makes sense and I got it to work just fine.

Thanks!

-- Brian


More information about the Digitalmars-d-learn mailing list