title: Is the std::array bit compatible with the old C array?
body: <p>Is the underlying <em>bit representation</em> for an <code>std::array&lt;T,N&gt; v</code> and a <code>T u[N]</code> the same?</p>
  
  <p>In other words, is it safe to copy <code>N*sizeof(T)</code> bytes from one to the other? (Either through <code>reinterpret_cast</code> or <code>memcpy</code>.)</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>For clarification, the emphasis is on <em>same bit representation</em> and <code>reinterpret_cast</code>.</p>
  
  <p>For example, let's suppose I have these two classes over some trivially copyable type <code>T</code>, for some <code>N</code>:</p>
  
  <pre><code>struct VecNew {
      std::array&lt;T,N&gt; v;
  };
  
  struct VecOld {
      T v[N];
  };
  </code></pre>
  
  <p>And there is the legacy function</p>
  
  <pre><code>T foo(const VecOld&amp; x);
  </code></pre>
  
  <p>If the representations are the same, then this call is safe and avoids copying:</p>
  
  <pre><code>VecNew x;
  foo(reinterpret_cast&lt;const VecOld&amp;&gt;(x));
  </code></pre>