Le Wed, 10 Dec 2008 03:16:49 +0100, Denis Koroskin <[EMAIL PROTECTED]> a
écrit:
On Wed, 10 Dec 2008 03:24:48 +0300, Jarrett Billingsley
<[EMAIL PROTECTED]> wrote:
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);
}
*And* allows overriding them!
Thanks you all !