On 24 July 2014 22:15, Daniel Murphy via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
"Manu via Digitalmars-d" <digitalmars-d@puremagic.com> wrote in message news:mailman.274.1406201953.32463.digitalmars-d@puremagic.com...


Is it possible for templates or types to both appear in the same context and create an actual ambiguity? What would that expression look like?

alias X = T!U;

What is U?  Did you mean to pass the template or the type?

I didn't specify, and I don't think this code requires that I do.

T will resolve this situation naturally.
Is it 'template T(X)'? Obviously the type.
Is it 'template T(alias X)'? this could be the type or the template, but since the template is more inclusive, it should be that. Within T's definition, if T is passed as the template, then the opportunity is retained to go either way as is necessary when the context becomes explicit.
I actually think it works quite elegantly. What have I missed?