title: std::ptr_fun replacement for c++17
body: <p>I am using <code>std::ptr_fun</code> as follows:</p>
  
  <pre><code>static inline std::string &amp;ltrim(std::string &amp;s) {
      s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun&lt;int, int&gt;(std::isspace))));
      return s;
  }
  </code></pre>
  
  <p>as presented in <a href="https://stackoverflow.com/a/217605">this answer</a>.</p>
  
  <p>However this does not compile with C++17 (using Microsoft Visual Studio 2017), with the error:</p>
  
  <pre><code>error C2039: 'ptr_fun': is not a member of 'std'
  </code></pre>
  
  <p>How can this be fixed?</p>