Get address of a non-POD object from within a data member, which is a single-use nested class
<p>I'll start with some code:</p>

<pre><code>class myNonPODClass
{
public:
    virtual ~myNonPODClass() {}
    class
    {
    public:
        myNonPODClass* GetContainer()
        {
            return (myNonPODClass*)((int8_t*)(this) - offsetof(myNonPODClass, member));
        }
    } member;
};
</code></pre>

<p>Obviously, this is a contrived example. The code compiles fine, but I'm worried about the "Offset of on non-POD type 'myNonPODClass'". Is there a better way to do essentially the same thing WITHOUT having to pass the myNonPODClass pointer into the nested anonymous classes constructor (or similar)? "member" must be ready to go without any initialization. Is it possible? Thanks!</p>

<p>In case you're wondering what on Earth I could want this for, my PROPERTY macro and a commented out example on pastebin (yes, it's awesome ^^ ): <a href="http://pastebin.com/xnknf39m" rel="nofollow">http://pastebin.com/xnknf39m</a></p>
