Help!
jerro
a at a.com
Mon Nov 26 09:32:35 PST 2012
> Ummm, immediate problem. That interferes with my argument list,
> inhibits
> consecutive parameters. You'll notice my template had 'A' on
> the end... it
> would make for a horrible API if the second arg were to come
> first in this
> case... is that the only option?
You could just take all parameters as a tuple, and them constrain
them usin "if", like that:
template bar(foo...) if(foo.length == 2 && is(foo[1]))
{
}
More information about the Digitalmars-d
mailing list