Is it possible to force a template function to only accept parameters of a certain numerical type?
<p>For example</p>

<pre><code>template &lt;typename T&gt;
T foo(){ ... }
</code></pre>

<p>where T can only be a floating point type, that is float / double / long double</p>
