title: How does std swap deduce the length of an array?
body: <p>Here is the case of using std::swap to interchange values of two arrays.</p>
  
  <pre><code>int arr1[3]={1,2,3};
  int arr2[3]={4,5,6};
  std::swap(arr1,arr2);
  //Then arr1 becomes {4,5,6} and arr2 becomes {1,2,3}
  </code></pre>
  
  <p>The swap function is declared as </p>
  
  <pre><code>template &lt;class T, size_t N&gt; void swap(T (&amp;a)[N], T (&amp;b)[N])
    noexcept (noexcept(swap(*a,*b)));
  </code></pre>
  
  <p>I am curious about the mechanisms of the <code>size_t N</code> deduction, how is it accomplished? Since a pointer of an int array doesn't have any information about its length.</p>