I was given this code, to check if Y is a specialization of Bar. How does it work?
class Bar(T)
{
}
void foo(Y)()
{
static if (is(Y Z == Bar!Z))
{
// Here, Z is now an alias to whichever type Bar is
// instantiated with.
}
else
{
// Z is invalid here.
}
}