boost::trim and std::bind2nd
<p>I am trying to use <code>boost::trim</code> on a vector of strings. I understand that <a href="http://stackoverflow.com/a/2221871/625914">this solutions</a> works elegantly, however I cannot understand why</p>

<pre><code>std::for_each(df.colnames.begin(), df.colnames.end(),
    std::bind2nd(std::ptr_fun(boost::trim&lt;std::string&gt;), std::locale()));
</code></pre>

<p>doesn't work. I get error:</p>

<pre><code>error: ‘typename _Operation::result_type std::binder2nd&lt;_Operation&gt;::operator()(typename _Operation::first_argument_type&amp;) const [with _Operation = std::pointer_to_binary_function&lt;std::basic_string&lt;char&gt;&amp;, const std::locale&amp;, void&gt;; typename _Operation::result_type = void; typename _Operation::first_argument_type = std::basic_string&lt;char&gt;&amp;]’ cannot be overloaded
</code></pre>

<p>Why <code>std::bind2nd</code> doesn't work here?</p>
