Review: A new stab at a potential std.unittests
Sean Kelly
sean at invisibleduck.org
Fri Nov 19 14:44:11 PST 2010
Leandro Lucarella Wrote:
> Sean Kelly, el 19 de noviembre a las 14:59 me escribiste:
> >
> > This should work:
> >
> > void func(string x = __FILE__, T...)(T args);
> >
> > D allows defaulted template arguments to occur before non-defaulted ones.
>
> And what is func!("blah")(); is supposed to do, make x = "blah"? args[0]
> = "blah"? both?
void func(string x = __FILE__, T...)(T args)
{
writeln( x, ' ', args.length );
}
void main()
{
func!("hi")();
}
prints:
hi 0
More information about the Digitalmars-d
mailing list