isExpression with bool template parameter
Ali Çehreli
acehreli at yahoo.com
Tue Mar 26 06:45:51 PDT 2013
On 03/25/2013 11:15 PM, cal wrote:
> On Tuesday, 26 March 2013 at 06:03:55 UTC, cal wrote:
>> I.e., why I can't match on some generic second parameter - what if the
>> second parameter was an int:
>>
>> struct S(A, int B) {}
>> static assert(is(S!(int, 5627) _ == S!(U, ??), U, ??));
>>
>> how to match that in the isExpression?
> But it seems like is(S!(int, 5) _ : S!(U, V), U, V) should work to me.
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
More information about the Digitalmars-d-learn
mailing list