Assigning to a shared_ptr, is there a way to do it?
<p>is there a way of first initialize shared_ptr with nullptr and after some time assing a pointer to a class to it?  </p>

<pre><code>//pseudo code
std::shared_ptr&lt;MyClass&gt; ptr(nullptr);  
//and later
ptr-&gt;assign(new MyClass);
</code></pre>
