[phobos] phobos commit, revision 2123

Steve Schveighoffer schveiguy at yahoo.com
Fri Nov 5 06:01:19 PDT 2010


A[0] is a static array of A's of size 0.  However, I'm not sure why it ever 
passes, because typeof(X) where X is already a type should fail, I think?

-Steve



----- Original Message ----
> From: Lars Tandle Kyllingstad <lars at kyllingen.net>
> 
> I noticed something funny when fixing this.  In the template  constraint
> for back(), is(typeof(A.init[0])), is used to check whether the  type A
> supports indexing.  This makes sense.  In the constraint for  front(),
> however, is(typeof(A[0])) is used.  Does anyone know why this  last case
> works at all?  Outside of typeof(), A[0] is completely  meaningless
> unless A is a tuple, so why allow this special  case?
> 
> -Lars



      


More information about the phobos mailing list