[D1] type of type

Steven Schveighoffer schveiguy at yahoo.com
Mon Dec 27 08:35:03 PST 2010


On Thu, 23 Dec 2010 17:28:49 -0500, %u <e at ee.com> wrote:

> Should have been this:
>
> void func(type t){
>   new t();
> }

void func(T)(){
    new T();
}

When you are passing types into functions, use templates.

-Steve


More information about the Digitalmars-d-learn mailing list