Re: comma inside is expression

2012-03-17 Thread Philippe Sigaud
On Thu, Mar 15, 2012 at 03:34, Jos van Uden wrote: > I've been reading the tutorial on templates and found this example: > > template rank(T)  { >    static if (is(T t == U[], U)) // is T an array of U, for some type U? >        enum rank = 1 + rank!(U); // then let’s recurse down. >    else >    

Re: comma inside is expression

2012-03-14 Thread Nathan M. Swan
On Thursday, 15 March 2012 at 02:34:45 UTC, Jos van Uden wrote: I've been reading the tutorial on templates and found this example: template rank(T) { static if (is(T t == U[], U)) // is T an array of U, for some type U? enum rank = 1 + rank!(U); // then let’s recurse down. e

comma inside is expression

2012-03-14 Thread Jos van Uden
I've been reading the tutorial on templates and found this example: template rank(T) { static if (is(T t == U[], U)) // is T an array of U, for some type U? enum rank = 1 + rank!(U); // then let’s recurse down. else enum rank = 0; // Base case, ending the recursion. } T