Is it possible to make pointers to distinct template types convertible?
<p>I have a template class that will bundle some information with a type:</p>

<pre><code>template &lt;typename T&gt;
class X
{
  int data[10]; // doesn't matter what's here really
  T t;
public:
  // also not terribly relevant
};
</code></pre>

<p>Then lets say we have a Base class and Derived class:</p>

<pre><code>class Base {};

class Derived : public Base {};
</code></pre>

<p>I'd like to be able to do something like this (but don't think I can):</p>

<pre><code>void f(shared_ptr&lt;X&lt;Base&gt; &gt; b);

shared_ptr&lt;X&lt;Derived&gt; &gt; d(new X&lt;Derived&gt;);

f(d);
</code></pre>

<p>Is there a way that I can make pointers to <code>X&lt;T&gt;</code> convertible to pointers of <code>X&lt;Y&gt;</code> if T* is convertible to Y*?</p>
