Template constraint on alias template parameter.

jmh530 john.michael.hall at gmail.com
Thu Aug 6 18:34:52 UTC 2020


On Thursday, 6 August 2020 at 18:09:50 UTC, ag0aep6g wrote:
> [snip]
>
> `is(...)` only works on types. You're looking for 
> `__traits(isSame, T, Foo)`.
>
> For `is(T!U == Foo!U, U)` to work, the compiler would have to 
> guess U. If the first guess doesn't work, it would have to 
> guess again, and again, and again, until it finds a U that does 
> work. Could take forever.

Thanks for the explanation!


More information about the Digitalmars-d-learn mailing list