On Tuesday, 26 March 2013 at 14:26:59 UTC, cal wrote:
I guess the tuple version is fine, it is just surprising that only one of the three parameter types can be directly matched. It is also surprising that this example from the docs works:

Because 'Tuple' is a template, not a type.
Please recall that:

struct Tuple(T...) { ... }

is a syntactic sugar of:

template Tuple(T...) { struct Tuple { ... } }

alias Tuple!(int, string) Tup;
static if (is(Tup : TX!TL, alias TX, TL...))

(matching an alias) but the alias can't be directly matched when it appears as a parameter of the type.

So, `alias TX` will bind the template Tuple. There is no problem.

Kenji Hara

Reply via email to