On 2 October 2012 16:45, Manu <turkey...@gmail.com> wrote:

> On 2 October 2012 16:24, Andrej Mitrovic <andrej.mitrov...@gmail.com>wrote:
>
>> On 10/2/12, Manu <turkey...@gmail.com> wrote:
>> > Does anyone have any clever tricks that will work in this scenario? Some
>> > magic tuple syntax?
>>
>> Without resorting to helper templates I only know of using this internal
>> trick:
>>
>> 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!
>

Actually, this leaves a problem...
Distinction between:
  Event x; // using defaults
and
  Event!() x; // explicitly selecting none (which would fall back to the
defaults)

Is such a distinction possible? I presume not...

Reply via email to