title: How to return NULL from a method in a Template Class
body: <p>I have a method which looks like this:</p>
  
  <pre><code>template &lt;typename T&gt;
  T Test&lt;T&gt;::FindItem(T item)
  {
      if(found)
          //return original value, no problem here
      else
          //I want to return NULL here, like:
          return NULL; 
  }
  </code></pre>
  
  <p>This fails in certain cases at runtime because some of the values can't be converted to NULL in C++ e.g., <code>std::string</code>. What approach should I follow here?</p>