xxxxxxxxxx
import std.stdio;
//Your example:
string SomeFuncThatAlsoCompiles(T : AT[], AT)()
{
return AT.stringof;
}
pragma( msg, SomeFuncThatAlsoCompiles!( int[] ) );
//Example from issue 10945:
struct Templ(Args...)
{
}
struct Templ2(Args...)
{
}
struct WillAlsoWork(alias T : Templ!Args, Args...)
{
alias A = Args[0];
}
void main()
{
alias C = Templ!int;
alias B = WillAlsoWork!C;
B.A a;
alias C2 = Templ2!int;
static assert(!__traits(compiles, {
alias B2 = WillAlsoWork!C2;
B2.A a2;
}));
}