title: No instance of function template remove_if matches argument list
body: <p>I am trying to remove whitespaces from a string </p>
  
  <pre><code>line.erase(remove_if(line.begin(), line.end(), isspace), line.end()); 
  </code></pre>
  
  <p>But Visual Studio 2010 (C++ Express) tells me  </p>
  
  <pre><code>1   IntelliSense: no instance of function template "std::remove_if" matches the argument list   d:\parsertry\parsertry\calc.cpp 18
  </code></pre>
  
  <p><strong><a href="http://pastie.org/5114486" rel="nofollow">Full Source</a></strong></p>
  
  <p>Why is that? A simple piece of code </p>
  
  <pre><code>int main() {
      string line = "hello world   111    222";
      line.erase(remove_if(line.begin(), line.end(), isspace), line.end());
      cout &lt;&lt; line &lt;&lt; endl;
  
      getchar();
  
      return 0;
  }
  </code></pre>
  
  <p>Verifies the function works? </p>
  
  <p>Funny thing is despite that, it runs giving correct result. </p>