title: std::vector<float> and double* - How safe is this?
body: <p>Is it safe to do this?</p>
  
  <pre><code>double darray[10];
  vector&lt;float&gt; fvector;
  fvector.insert(fvector.begin(), darray, darray + 10);  // double to float conversion
  
  // now work with fvector
  </code></pre>
  
  <p>VS2008 gives me a warning about the double to float conversion. How do I get rid of this warning? I don't think it makes sense  to cast <code>darray</code> to <code>float*</code> as that would change the step size (stride) of the pointer.</p>
  
  <p><strong>Update:</strong> I know what the warning indicates. But unlike the "afloat = adouble;" scenario where I can easily apply a cast, I am unable to eliminate the warning in this case.</p>
  
  <p><strong>Edit:</strong> I've edited the code so that <code>darray</code> is no longer a function argument. Thanks to all those of you who pointed it out.</p>