On Wed, 25 Aug 2010 09:55:47 -0400, bearophile <bearophileh...@lycos.com> wrote:

Steven Schveighoffer:
Inside a template instantiation, the template name without template
parameters is equivalent to the current instantiation.

It saves a lot of typing.

And causes some troubles :-) It's a barter, and I am not sure it's a good one.

What trouble? I've already stated in the bug report how there's not anything better you can expect from the compiler. If it was required to specify the template parameters instead of using the shortcut, then you would be no better off. Here is something I had found to be a problem with dcollections:

final class TreeMap(K, V, alias ImplTemp=RBTree, alias compareFunc=DefaultCompare)
{
   ...
   TreeMap!(K, V) set(K k, V v) {...}
   ...
}

Notice the problem?

-Steve

Reply via email to