Reinterpreting a union to a different union : <p>I have a standard-layout union that has a whole bunch of types in it:</p>

<pre><code>union Big {
    Hdr h;

    A a;
    B b;
    C c;
    D d;
    E e;
    F f;
};
</code></pre>

<p>Each of the types <code>A</code> thru <code>F</code> is standard-layout and has as its first member an object of type <code>Hdr</code>. The <code>Hdr</code> identifies what the active member of the union is, so this is variant-like. Now, I'm in a situation where I know for certain (because I checked) that the active member is either a <code>B</code> or a <code>C</code>. Effectively, I've reduced the space to:</p>

<pre><code>union Little {
    Hdr h;

    B b;
    C c;
};
</code></pre>

<p>Now, is the following well-defined or undefined behavior?</p>

<pre><code>void given_big(Big const&amp; big) {
    switch(big.h.type) {
    case B::type: // fallthrough
    case C::type:
        given_b_or_c(reinterpret_cast&lt;Little const&amp;&gt;(big));
        break;
    // ... other cases here ...
    }
}

void given_b_or_c(Little const&amp; little) {
    if (little.h.type == B::type) {
        use_a_b(little.b);
    } else {
        use_a_c(little.c);
    }
}
</code></pre>

<p>The goal of <code>Little</code> is to effectively serve as documentation, that I've already checked that it's a <code>B</code> or <code>C</code> so in the future nobody adds code to check that it's an <code>A</code> or something. </p>

<p>Is the fact that I am reading the <code>B</code> subobject as a <code>B</code> enough to make this well-formed? Can the common initial sequence rule meaningfully be used here?</p>
