title: Type condition in template
body: <p>Is it possible to build only some part of the code given the type of the template in C++ ?
  It would be something lake that :</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  template&lt;typename T&gt;
  void printType(T param)
  {
      #if T == char*
          cout &lt;&lt; "char*" &lt;&lt; endl;
      #elif T == int
          cout &lt;&lt; "int" &lt;&lt; endl;
      #else
          cout &lt;&lt; "???" &lt;&lt; endl;
      #endif
  }
  
  int main()
  {
      printType("Hello world!");
      printType(1);
      return 0;
  }
  </code></pre>