Template function specialization doesn't work

IGotD- nise at nise.com
Tue Jul 7 20:21:56 UTC 2020

On Tuesday, 7 July 2020 at 20:14:19 UTC, IGotD- wrote:
> Thank you, that worked and now it picked the correct overloaded 
> function. I don't understand why and it is a bit counter 
> intuitive. Why two template arguments as I'm not even us using 
> U?
> If you look at the article
> https://dlang.org/articles/templates-revisited.html#specialization
> Then it mentioned that (T : T*) would work. Intuitively, then 
> you would think (T : T[]) would work.

Here (T : T[]) is even the example with the correct double[] type 
as a correct example as well.


I'm confused.

More information about the Digitalmars-d-learn mailing list