title: Create derived class instance from a base class instance without knowing the class members
body: <p>Is this scenario even possible?</p>
  
  <pre><code>class Base
  {
    int someBaseMemer;
  };
  
  template&lt;class T&gt;
  class Derived : public T
  {
    int someNonBaseMemer;
  
    Derived(T* baseInstance);
  };
  </code></pre>
  
  <p>Goal: </p>
  
  <pre><code>Base* pBase = new Base();
  pBase-&gt;someBaseMemer = 123; // Some value set
  Derived&lt;Base&gt;* pDerived = new Derived&lt;Base&gt;(pBase);
  </code></pre>
  
  <p>The value of pDerived->someBaseMemer should be equeal to pBase->someBaseMember and similar with other base members.</p>