Getting .init of a Typetuple

Simen kjaeraas simen.kjaras at gmail.com
Thu Aug 19 13:16:11 PDT 2010


Philippe Sigaud <philippe.sigaud at gmail.com> wrote:

> And, looking in my codebase, here is what I'm using ;)
>
> template Init(T...)
> {
>     T Init;
> }

Doh. I believe this is slightly better, though:

template Init( T... ) {
     enum T Init;
}

:p

-- 
Simen


More information about the Digitalmars-d-learn mailing list