title: Template Function Specialization for Integer Types
body: <p>Suppose I have a template function:</p>
  
  <pre><code>template&lt;typename T&gt;
  void f(T t)
  {
      ...
  }
  </code></pre>
  
  <p>and I want to write a specialization for all primitive integer types.  What is the best way to do this?</p>
  
  <p>What I mean is:</p>
  
  <pre><code>template&lt;typename I where is_integral&lt;I&gt;::value is true&gt;
  void f(I i)
  {
      ...
  }
  </code></pre>
  
  <p>and the compiler selects the second version for integer types, and the first version for everything else?</p>