Implicit Template Parameters Cannot Decipher Aliases?

Vijay Nayar madric at gmail.com
Wed Apr 25 11:26:40 UTC 2018


On Wednesday, 25 April 2018 at 10:25:11 UTC, Simen Kjærås wrote:
> In the general case, the issue is unsolvable, since the 
> relationship between template parameters and alias results may 
> be arbitrarily complex. A simple degenerate case is this:

Ok, wow, you weren't kidding. That becomes really complex really 
fast.

In that case, is the general rule of thumb that programmers 
should not use aliases for templated types when specifying 
template function parameters?  No implicit type inference is done 
on the return type or on local variables, so these alias seem 
fine enough there. Or should they just be entirely avoided to 
avoid these kinds of problems?


More information about the Digitalmars-d-learn mailing list