Difference between static_cast<primitive_type>(foo) and primitive_type(foo)
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/28002/regular-cast-vs-static-cast-vs-dynamic-cast">Regular cast vs. static_cast vs. dynamic_cast</a><br>
  <a href="http://stackoverflow.com/questions/103512/in-c-why-use-static-castintx-instead-of-intx">In C++, why use static_cast&lt;int&gt;(x) instead of (int)x?</a>  </p>
</blockquote>



<p>What is the difference between <code>static_cast&lt;float&gt;(foo)</code> and <code>float(foo)</code>? I often see <code>static_cast&lt;float&gt;</code> or similar in template code to get from any integral type to some specific integral type. For example say I wanted a function to perform floating point division on any integral type. I normally see something like this:</p>

<pre><code>template &lt;typename T&gt;
float float_div(T lhs, T rhs)
{
    // I normally see this
    return static_cast&lt;float&gt;(lhs) / static_cast&lt;float&gt;(rhs);

    // But I could do this
    // return float(lhs) / float(rhs); // But I could do this
}
</code></pre>

<p>Is there any advantage to using <code>float(lhs)</code> or <code>static_cast&lt;float&gt;(lhs)</code>? Also what is the name of the <code>float(lhs)</code> initialization/conversion?</p>
