Is binding to alias a definite superset of binding to a type parameter?

Stefan Koch uplink.coder at googlemail.com
Mon May 25 21:13:10 UTC 2020


On Monday, 25 May 2020 at 20:58:56 UTC, Andrei Alexandrescu wrote:
> This seems to be an overlook:
>
> https://issues.dlang.org/show_bug.cgi?id=20863
>
> Are there any non-bug cases showing different treatment of type 
> parameters vs. alias parameters? I mean:
>
> template xyz(T) { ... }
>
> vs.
>
> template xyz(alias T) { ... }
>
> The second should "catch" everything the first does, and more.

It used to be the case that alias parameters could not bind basic 
types.
Because they are not symbols.

However I gather that this issue has been "worked around"
Therefore, an alias would bind to almost anything.
including any type.


More information about the Digitalmars-d mailing list