title: variable length array error when passing array using template deduction
body: <p>Hi when compiling the following I am getting an error. I am unsure why this is, if I change these to const values like [10][20] it works but doesn't seem to like the variable even though this a declaration so it is not subject to changing the dimensions.  I am confused why this is error is occurring please help. See code below:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  template &lt;size_t X, size_t Y&gt;
  void fun (int (&amp;array)[X][Y])
  {
      std::cout &lt;&lt; " do something fun " &lt;&lt; std::endl;
  }
  
  int main ( int argc, char *argv[] )
  {
    size_t row (10);
    size_t col (20);
  
    int data1[10][20];
    fun ( data1 );// compiles
  
    int data2[row][col];
    fun ( data2 );// fails
  
    return 0;
  }
  
  
  
  
  g++ -I/usr/include -I/usr/local/include -std=c++11 -pthread -O3 -Wall -c main.cpp -o main.o
  main.cpp: In function ‘int main(int, char**)’:
  main.cpp:18:15: error: no matching function for call to ‘fun(int [(((sizetype)(((ssizetype)row) + -1)) + 1)][(((sizetype)(((ssizetype)col) + -1)) + 1)])’
  main.cpp:18:15: note: candidate is:
  main.cpp:4:6: note: template&lt;long unsigned int X, long unsigned int Y&gt; void fun(int (&amp;)[X][Y])
  main.cpp:4:6: note:   template argument deduction/substitution failed:
  main.cpp:18:15: note:   variable-sized array type ‘int [(((sizetype)(((ssizetype)row) + -1)) + 1)][(((sizetype)(((ssizetype)col) + -1)) + 1)]’ is not a valid template argument
  make: *** [main.o] Error 1
  </code></pre>