title: c++ template casting
body: <p>I'm a little lost in how to cast templates. I have a function foo which takes a parameter of type <code>ParamVector&lt;double&gt;*</code>. I would like to pass in a <code>ParamVector&lt;float&gt;*</code>, and I can't figure out how to overload the casting operator for my <code>ParamVector</code> class, and Google isn't helping me that much. Does anyone have an example of how to do this? Thanks.</p>
  
  <p>EDIT: Adding some code, sorry I'm an idiot and didn't phrase the original question well at all;</p>
  
  <pre><code>template&lt;class T&gt; class ParamVector 
  {
  public:
      vector &lt;T&gt; gnome;
      vector &lt;T&gt; data_params;
  }
  
  template&lt;class T&gt; class ParamVectorConsumer
  {
   public:
   ParamVector&lt;T&gt; test;
  }
  
  ParamVector&lt;float&gt; tester;
  ParamVectorConsumer&lt;double&gt; cons;
  cons.ParamVector = tester
  </code></pre>
  
  <p>will fail to compile. I would like to know how to write it so that I can cast the float version of tester to a ParamVector double. Thanks</p>
  
  <p>EDIT2: Casting was the wrong word. I don't mind writing extra code, I just need to know how to get this to be accepted by the compiler so that I can write some sort of conversion code.</p>