variadic args

Endea notknown at none.com
Mon Dec 11 05:57:42 PST 2006


Aarti_pl kirjoitti:
> I just would wish myself that Walter will add support for templatized 
> constructors to achieve following:
>     # printVariadic(new Any(4), new Any("Yet another text"[]), new 
> Any(3.14)); // it doesn't work now...
> 

Would this work?

static Any opCall(T)(T t)
{
   return (new Any()).assign(t);
}


More information about the Digitalmars-d-learn mailing list