www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - TemplateParameterList in is expression

I'm having some problems understanding the (complex) is expression.

 // Example from the documentation
 static if (is(int[10] X : X[Y], int Y : 5))
 {
 	assert(0);	// should not match, Y should be 10
 }

 // but this doesn't match either.. Shouldn't it?
 static if (is(int[10] X : X[Y], int Y : 10))
 {
 	assert(0);
 }
Mar 16 2011