title: How can the newly created instance of type T be accessed after calling spawn_typed<T>(...)? (C++ Actor Framework)
body: <p>In the following example, the spawned actor is of type <code>a_type</code>, which is based on the <code>typed_actor</code> template. How do I convert from <code>a_type</code> to an instance of class <code>A</code>?</p>
  
  <pre><code>using a_type = typed_actor&lt;replies_to&lt;int&gt;::with&lt;void&gt;&gt;;
  
  class A : public a_type::base
  {
  protected:
      behavior_type make_behavior() override
      {
          return
          {
              [this](int value)
              {
                  aout(this) &lt;&lt; value &lt;&lt; endl;
              }
          };
      }
  };
  
  int main()
  {
      a_type spawned = spawn_typed&lt;A&gt;();
  }
  </code></pre>