typeof([2,2]) !=? int[2]

cal callumenator at gmail.com
Fri Mar 8 15:09:03 PST 2013


On Friday, 8 March 2013 at 23:03:47 UTC, Zhenya wrote:

Your constraint could be:

if(is(typeof(size) _ == int[]) && size.length > 0)

Also it looks like you are passing 1 too many template args?

static if(n > 1)
   NDimensionalArray!(T,n - 1,size[1..$]) m_array[size[0]];
                              ^^


More information about the Digitalmars-d-learn mailing list