Is this defined
<p>Suppose I have a class <code>A</code>:</p>

<pre><code>class A : virtual SomeOtherClass{
  //Stuff here
};
</code></pre>

<p>Suppose I have do this somewhere:</p>

<pre><code>A thing;
alignas(A) uint8_t arr[sizeof(A)];
for (int x = 0; x &lt; sizeof(A); x++)
{
  //Copy into array
  arr[x] = reinterpret_cast&lt;uint8_t*&gt;(&amp;A)[x];
}

A* otherThing = reinterpret_cast&lt;A*&gt;(arr);
</code></pre>

<p>Is what I am doing here defined behavior, or am I killing myself in someway that I am unaware?</p>