Question about tuple as template parameter

Max Samukha nospam at nospam.com
Tue Apr 22 02:32:36 PDT 2008


Why the compiler chooses the template with tuple paramer? Isn't the
template with type parameter more 'specialized'?

template Foo(T)
{
	pragma(msg, "Type");
}

template Foo(TT...)
{
	pragma(msg, "Tuple");
}

alias Foo!(int) foo;
----
Outputs: Tuple


More information about the Digitalmars-d-learn mailing list