Are there any guarantees for unions that contain a wrapped type and the type itself? : <p>Can I put a <code>T</code> and a wrapped <code>T</code> in an <code>union</code> and inspect them as I like?</p>

<pre><code>union Example {
    T value;
    struct Wrapped { 
       T wrapped;
    } wrapper;
};
</code></pre>



<pre><code>// for simplicity T = int

Example ex;
ex.value = 12;
cout &lt;&lt; ex.wrapper.wrapped; // ?
</code></pre>

<p>The C++11 standards only guarantee save inspection of the common initial sequence, but <code>value</code> isn't a <code>struct</code>. I <em>guess</em> the answer is <strong>no</strong>, since <a href="https://stackoverflow.com/questions/46425250/does-a-phantom-type-have-the-same-alignment-as-the-original-one">wrapped types aren't even guaranteed to be memory compatible to their unwrapped counterpart</a> and <a href="https://stackoverflow.com/questions/11373203/accessing-inactive-union-member-and-undefined-behavior">accessing inactive members is only well-defined on common initial sequences</a>.</p>
