title: std::remove_if and std::isspace - compile-time error
body: <p>I have the following code:</p>
  
  <pre><code>#include &lt;algorithm&gt;
  #include &lt;cctype&gt;
  #include &lt;string&gt;
  
  int main()
  {
      std::string str;
      str.erase(std::remove_if(str.begin(), str.end(), std::isspace), str.end());
  }
  </code></pre>
  
  <p>MSVC-11.0 compiles this code without any error, but gcc 4.7.2 gives me the following errors:</p>
  
  <pre><code>main.cpp: In function ‘int main()’:
  main.cpp:8:66: error: no matching function for call to ‘remove_if(std::basic_string&lt;char&gt;::iterator, std::basic_string&lt;char&gt;::iterator, &lt;unresolved overloaded function type&gt;)’
  main.cpp:8:66: note: candidate is:
  In file included from /usr/include/c++/4.7/algorithm:63:0,
                   from main.cpp:1:
  /usr/include/c++/4.7/bits/stl_algo.h:1160:5: note: template&lt;class _FIter, class _Predicate&gt; _FIter std::remove_if(_FIter, _FIter, _Predicate)
  /usr/include/c++/4.7/bits/stl_algo.h:1160:5: note:   template argument deduction/substitution failed:
  main.cpp:8:66: note:   couldn't deduce template parameter ‘_Predicate’
  </code></pre>
  
  <p>I found <a href="https://stackoverflow.com/questions/15985612/remove-if-throw-error-when-trying-to-remove-white-space">this</a> question about it, but according to the <a href="http://en.cppreference.com/w/cpp/string/byte/isspace" rel="noreferrer">cppreference</a>, there isn't any version of this function that takes two arguments. I found <a href="https://stackoverflow.com/questions/4537930/removing-a-character-from-a-string">this</a> question too, but according to the cppreference (yep, again) I see that there's only one std::isspace function overload.</p>
  
  <p>Who's right? What am I doing wrong? How can I fix it?</p>