[DIP] Resolution of Alias Template Parameters in Function Templates

jmh530 john.michael.hall at gmail.com
Mon May 20 19:07:49 UTC 2019


On Monday, 20 May 2019 at 19:05:06 UTC, jmh530 wrote:
> On Monday, 20 May 2019 at 18:20:06 UTC, Stefanos Baziotis wrote:
>> [snip]
>>
>> But with the above reasoning we want this to fail (that is, 
>> evaluate is(T == int) as true and go there) because aliases 
>> and template aliases are indistinguishable from
>> the type they alias.
>
> Sorry, it would be true for Num!int, but false for Num!float or 
> something else.

It makes more sense if I said it should evaluate is(T==int) in 
the first static if for Num!int and then go to the second static 
if and evaluate is(T==float) for Num!float.

That's just because of the way you have the static ifs set up.


More information about the Digitalmars-d mailing list