title: template function roundTo int, float -> truncation
body: <p>according to this question:
  <a href="https://stackoverflow.com/questions/2833730/calling-template-function-without-type-inference">Calling template function without &lt;&gt;; type inference</a>
  the round function I will use in the future now looks like:</p>
  
  <pre><code>template &lt; typename TOut, typename TIn &gt;
  TOut roundTo( TIn value ) {
     return static_cast&lt;TOut&gt;( value + 0.5 );
  }
     double d = 1.54;
     int i = rountTo&lt;int&gt;(d);
  </code></pre>
  
  <p>However it makes sense only if it will be used to round to integral datatypes like char, short, int, long, long long int, and it's unsigned counterparts.
  If it ever will be used with a TOut As float or long double it will deliver s***.</p>
  
  <pre><code>double d = 1.54;
  float f = roundTo&lt;float&gt;(d);
  // aarrrgh now float is 2.04;
  </code></pre>
  
  <p>I was thinking of a specified overload of the function but ...<br>
  that's not possible...<br>
  How would you solve this problem?<br>
  many thanks in advance<br>
  Oops</p>