title: Is sizeof(T) == sizeof(int)?
body: <p>I've been poring over the draft standard and can't seem to find what I'm looking for.</p>
  
  <p>If I have a standard-layout type</p>
  
  <pre><code>struct T {
     unsigned handle;
  };
  </code></pre>
  
  <p>Then I know that <code>reinterpret_cast&lt;unsigned*&gt;(&amp;t) == &amp;t.handle</code> for some <code>T t;</code> </p>
  
  <p>The goal is to create some <code>vector&lt;T&gt; v</code> and pass <code>&amp;v[0]</code> to a C function that expects a pointer to an array of unsigned integers.</p>
  
  <p>So, does the standard define <code>sizeof(T) == sizeof(unsigned)</code> and does that imply that an array of <code>T</code> would have the same layout as an array of <code>unsigned</code>?</p>
  
  <p>While <a href="https://stackoverflow.com/questions/3585033/size-of-struct-with-a-single-element">this question</a> addresses a very similar topic, I'm asking about the specific case where both the data member and the class are standard layout, and the data member is a fundamental type.</p>
  
  <p>I've read some paragraphs that seem to hint that <em>maybe</em> it might be true, but nothing that hits the nail on the head. For example:</p>
  
  <p>§ 9.2.17</p>
  
  <blockquote>
    <p>Two standard-layout struct (Clause 9) types are layout-compatible if
    they have the same number of non-static data members and corresponding
    non-static data members (in declaration order) have layout-compatible
    types</p>
  </blockquote>
  
  <p>This isn't quite what I'm looking for, I don't think.</p>