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]]; ^^