title: comparison in templated function
body: <p>I am writing a templated function which at some point does a comparison</p>
  
  <pre><code>template&lt;typename T&gt;
  void Foo(T val)
  {
      .
      .
      .
  
      if(val != 0) // what if val is of type std::string?
      {
          doSomething();
      }
  }
  </code></pre>
  
  <p>this works for integer data but what if T is std::string? How should I handle that condition so that I can use both std::string and int in the function?</p>