> void convolve(float[N][M] mask, N, M)(float[][] a, float[][] b) { That's quite wrong anyway. This looks a bit better: void convolve(float[N][M] mask)(float[][] a, float[][] b) {
> You have to use an alias plus static asserts: Or better a template constraint: void convolve(alias mask)(float[][] a, float[][] b) if (__traits(isStaticArray, typeof(mask)) && __traits(isStaticArray, typeof(mask[0]))) { //... } Bye, bearophile