Determine class instance of a member in C++
<p>I've never seen this in any language, but I was wondering if this is possible using some trick that I don't know.</p>

<p>Let's say that I have a function like</p>

<pre><code>struct A {
  // some members and methods ...
  some_t t;
  // more members ...
};   


void test(some_t&amp; x) { // a reference to avoid copying a new some_t
    // obtain the A instance if x is the t member of an A 
    // or throw an error if x is not the t member of an A
    ...
    // do something
}
</code></pre>

<p>Would it be possible to obtain the instance of <code>A</code> whose member <code>t</code> is <code>x</code> ?</p>
