title: Get template function type
body: <p>I'm new in using templates in C++, I want to do different things depending on type used between <code>&lt;</code> and <code>&gt;</code>, so <code>function&lt;int&gt;()</code> and <code>function&lt;char&gt;()</code> won't do the same things.
  How can I achieve this?</p>
  
  <pre><code>template&lt;typename T&gt; T* function()
  {
      if(/*T is int*/)
      {
          //...
      }
      if(/*T is char*/)
      {
          //...
      }
      return 0;
  }
  </code></pre>