Template object of different data type than template parameter
<p>I have a templated class, and I want a member-function takes in an object of that class with any template parameter.  So it should be able to run something like:</p>

<pre><code>main(){
     A&lt;double&gt; object1;
     A&lt;double&gt; object2;
     A&lt;int&gt; object3;

     object1.f(object2);
     object1.f(object3);
}
</code></pre>

<p>This is what I have so far, but it doesn't seem to work because it assumes that the argument must be of the exact same type as the calling object:</p>

<pre><code>template&lt;typename T&gt;
class A
{
    void f(A&lt;T&gt; &amp;a);
}
</code></pre>

<p>Any ideas?  Thanks in advance.</p>
