On Tue, Dec 9, 2008 at 7:00 PM, BCS <[EMAIL PROTECTED]> wrote: > class C > { > final void add(T...)(T t) > { > foreach(int i,_;T) > _add(t[i]); > } > //..... > } > > > (new C).add(something, otherthings, thisToo);
If all the params are the same type, typesafe variadics are a more efficient/less code-bloaty way to do it. void add(int[] things...) { foreach(thing; things) _add(thing); }