When can I access an object member directly in memory? No getters called
<p>It is usually allowed to do something like that (no comments on the code please :-))</p>

<pre><code>class SimpleClass {
    int member;
};

SimpleClass instance;
int* pointer = (int*) &amp;instance;
</code></pre>

<p>However, if I define my class as:</p>

<pre><code>class SimpleClass {
    virtual void foo();
    int member;
};
</code></pre>

<p>I can't do that anymore. Well, I guess I can, of course; it's just more complex.</p>

<p>So I was wondering: is it somewhere specified, or the only way to know when I can do that is just to use some common sense? Not counting alignment issues, which can usually be solved</p>
