title: Why does int*[] decay into int** but not int[][]?
body: <p>I'm trying to understand the nature of type-decay. For example, we all know arrays decay into pointers in a certain context. My attempt is to understand how <code>int[]</code> equates to <code>int*</code> but how two-dimensional arrays don't correspond to the expected pointer type. Here is a test case:</p>
  
  <pre><code>std::is_same&lt;int*, std::decay&lt;int[]&gt;::type&gt;::value; // true
  </code></pre>
  
  <p>This returns true as expected, but this doesn't:</p>
  
  <pre><code>std::is_same&lt;int**, std::decay&lt;int[][1]&gt;::type&gt;::value; // false
  </code></pre>
  
  <p>Why is this not true? I finally found a way to make it return true, and that was by making the first dimension a pointer:</p>
  
  <pre><code>std::is_same&lt;int**, std::decay&lt;int*[]&gt;::type&gt;::value; // true
  </code></pre>
  
  <p>And the assertion holds true for any type with pointers but with the last being the array. For example (<code>int***[] == int****; // true</code>).</p>
  
  <p>Can I have an explanation as to why this is happening? Why doesn't the array types  correspond to the pointer types as would be expected?</p>