isExpression with bool template parameter
cal
callumenator at gmail.com
Tue Mar 26 07:26:58 PDT 2013
On Tuesday, 26 March 2013 at 13:45:52 UTC, Ali Çehreli wrote:
> There are three kinds of template parameters: type, value, and
> alias.
>
> That syntax does not work because you are trying to match 5 to
> V, where 5 is a value and V is a type.
>
> Ali
Thanks Ali,
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:
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.
More information about the Digitalmars-d-learn
mailing list