On 2 October 2012 16:45, Manu <turkeyman@gmail.com> wrote:
On 2 October 2012 16:24, Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:On 10/2/12, Manu <turkeyman@gmail.com> wrote:Without resorting to helper templates I only know of using this internal trick:
> Does anyone have any clever tricks that will work in this scenario? Some
> magic tuple syntax?
struct Event(Args...)
{
static if (Args.length)
alias Args T;
else
alias TypeTuple!(int, float) T;
void F(T t) { }
}
Also there's a somewhat related bug but for variadic template
functions with default arguments:
http://d.puremagic.com/issues/show_bug.cgi?id=8687
I think this is fine for my needs. Thanks!